The callback interface that provides responses from the server, together with a context object supplied by the application.
public interface IContextCallback<in TContext>
The context object type.
This interface and its extensions are alternatives to the ICallback interface hierarchy that allow the application to associate an arbitrary context object with each call. Any suitable application object can be provided as the context. It will be passed on to the corresponding callback methods, allowing requests and responses to be correlated. The context object is optional (it may be null).
In all other respects this interface and ICallback behave identically.
Notification of a contextual error related to this callback.
void OnError(TContext context, ErrorReason errorReason)
The context object supplied when making the call. May be null.
The reason for the error.
This is analogous to an exception being raised. Situations in which this method is called include the session being closed, a communication timeout, or a problem with the provided parameters. No further calls will be made to this callback for the call context.