다음을 통해 공유


IClientMessageInspector Interface

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines a message inspector object that can be added to the MessageInspectors collection to view or modify messages.

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

Syntax

'Declaration
Public Interface IClientMessageInspector
public interface IClientMessageInspector

The IClientMessageInspector type exposes the following members.

Methods

  Name Description
Public method AfterReceiveReply Enables inspection or modification of a message after a reply message is received but prior to passing it back to the client application.
Public method BeforeSendRequest Enables inspection or modification of a message before a request message is sent to a service.

Top

Remarks

Implement the IClientMessageInspector interface and add it to the MessageInspectors collection to inspect or modify messages as they pass through a Silverlight client object. For additional information, see ClientRuntime.

Examples

The following code example shows an implementation that writes strings to the console when the implementation is called.

The following code example shows how to use an System.ServiceModel.Description.IEndpointBehavior to insert the client message inspector in the client endpoint.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.