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.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
'Declaration Public Interface IClientMessageInspector
public interface IClientMessageInspector
The IClientMessageInspector type exposes the following members.
|AfterReceiveReply||Enables inspection or modification of a message after a reply message is received but prior to passing it back to the client application.|
|BeforeSendRequest||Enables inspection or modification of a message before a request message is sent to a service.|
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.
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.
Supported in: 5, 4
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.