Implement to participate in the creation or choosing of a System.ServiceModel.InstanceContext object, especially to enable shared sessions.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Called when a new message is received.
|InitializeInstanceContext(InstanceContext, Message, IContextChannel)|
Called when null is returned from the GetExistingInstanceContext method.
Implement the System.ServiceModel.InstanceContext object to the system. Typically, this interface is implemented to support shared sessions, enable service instance pooling, control lifetimes of service instances, or to group contexts among clients.interface to provide the appropriate
For example, to implement sharing, insert a custom InstanceContext object. For an example that demonstrates the sharing of instance contexts, see InstanceContextSharing.to decide which session or call from a client is associated with which
A more generic mechanism by which you can initialize InstanceContext objects when created (for example, to attach custom extensions to each InstanceContext) is the System.ServiceModel.Dispatcher.IInstanceContextInitializer.
Available since 3.0