Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IInstanceContextInitializer Interface

 

Defines the methods necessary to inspect or modify the creation of InstanceContext objects when required.

Namespace:   System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public interface class IInstanceContextInitializer

NameDescription
System_CAPS_pubmethodInitialize(InstanceContext^, Message^)

Provides the ability to modify the newly created InstanceContext object.

To inspect or modify InstanceContext objects when they are created, implement the IInstanceContextInitializer interface and use an IContractBehavior to add it to the InstanceContextInitializers property.

There can be any number of context initializers for a service. Typically, the IInstanceContextInitializer is added to attach an extension to the InstanceContext object as a mechanism for passing data throughout an application.

If you want to participate in providing or selecting the InstanceContext object that processes a message, see System.ServiceModel.Dispatcher::IInstanceContextProvider.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft