Export (0) Print
Expand All

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 IInstanceContextInitializer

The IInstanceContextInitializer type exposes the following members.

  NameDescription
Public methodInitializeProvides the ability to modify the newly created InstanceContext object.
Top

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

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft