This documentation is archived and is not being maintained.

ClientRuntime::MessageInspectors Property

Gets a collection of message inspector implementations for a client.

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

public:
property SynchronizedCollection<IClientMessageInspector^>^ MessageInspectors {
	SynchronizedCollection<IClientMessageInspector^>^ get ();
}

Use the MessageInspectors property to attach custom IClientMessageInspector implementations to inspect or modify all messages that flow through the client.

In the following code example an System.ServiceModel.Description::IEndpointBehavior inserts a System.ServiceModel.Dispatcher::IClientMessageInspector into the client runtime by adding it to the MessageInspectors property.

No code example is currently available or this language may not be supported.

The following code example shows a configuration file that loads the endpoint behavior into the client endpoint.

No code example is currently available or this language may not be supported.

  <client>
      <endpoint 
        address="http://localhost:8080/SampleService" 
        behaviorConfiguration="clientInspectorsAdded" 
        binding="wsHttpBinding"
        bindingConfiguration="WSHttpBinding_ISampleService" 
        contract="ISampleService"
        name="WSHttpBinding_ISampleService"
      >
      </endpoint>
  </client>
<behaviors>
  <endpointBehaviors>
    <behavior name="clientInspectorsAdded">
      <clientInterceptors />
    </behavior>
  </endpointBehaviors>
</behaviors>
<extensions>
  <behaviorExtensions>
    <add 
      name="clientInterceptors" 
      type="Microsoft.WCF.Documentation.InspectorInserter, HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
  />
  </behaviorExtensions>
</extensions>


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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