Interface IContextCallback<TContext>
The callback interface used to return results from a call to the server.
Namespace: PushTechnology.ClientInterface.Client.Features
Assembly: Diffusion.Client.dll
Syntax
public interface IContextCallback<in TContext>
Type Parameters
Name | Description |
---|---|
TContext | The context object type. |
Remarks
Caution
Deprecated since 6.7. Methods that use contextual callbacks are deprecated and will be removed in a future release. Use a Task instead.
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 ICallback and IContextCallback<TContext> behave identically.
Since 5.0
Methods
OnDiscard(TContext)
Called to notify that a call context was closed prematurely, typically due to a timeout or the session being closed.
Declaration
void OnDiscard(TContext context)
Parameters
Type | Name | Description |
---|---|---|
TContext | context | The context object associated with this callback. |
Remarks
No further calls will be made for the context.