다음을 통해 공유


IClientMessageInspector.AfterReceiveReply Method

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

Enables inspection or modification of a message after a reply message is received but prior to passing it back to the client application.

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

Syntax

'Declaration
Sub AfterReceiveReply ( _
    ByRef reply As Message, _
    correlationState As Object _
)
void AfterReceiveReply(
    ref Message reply,
    Object correlationState
)

Parameters

Remarks

Implement AfterReceiveReply to inspect or modify a reply message after it has been received by the Silverlight client object but before it is deserialized into objects that are returned to the client application.

The correlationState is the object returned by the user when BeforeSendRequest is called for this message. The best practice is to make this a System.Guid to ensure that no two correlationState objects are the same.

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.