Edit

Share via


ClientBuilderExtensions.AddClientInvokeCallback Method

Definition

Adds a client invocation callback.

public static Orleans.IClientBuilder AddClientInvokeCallback (this Orleans.IClientBuilder builder, Orleans.ClientInvokeCallback callback);
static member AddClientInvokeCallback : Orleans.IClientBuilder * Orleans.ClientInvokeCallback -> Orleans.IClientBuilder
<Extension()>
Public Function AddClientInvokeCallback (builder As IClientBuilder, callback As ClientInvokeCallback) As IClientBuilder

Parameters

builder
IClientBuilder

The builder.

callback
ClientInvokeCallback

The callback.

Returns

The builder.

Remarks

A ClientInvokeCallback ia a global pre-call interceptor. Synchronous callback made just before a message is about to be constructed and sent by a client to a grain. This call will be made from the same thread that constructs the message to be sent, so any thread-local settings such as Orleans.RequestContext will be picked up. The action receives an InvokeMethodRequest with details of the method to be invoked, including InterfaceId and MethodId, and a IGrain which is the GrainReference this request is being sent through This callback method should return promptly and do a minimum of work, to avoid blocking calling thread or impacting throughput.

Applies to