IClientMessageInspector::AfterReceiveReply Method (Message^%, Object^)

 

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)

void AfterReceiveReply(
	Message^% reply,
	Object^ correlationState
)

Parameters

reply
Type: System.ServiceModel.Channels::Message^%

The message to be transformed into types and handed back to the client application.

correlationState
Type: System::Object^

Correlation state data.

Implement AfterReceiveReply to inspect or modify a reply message after it has been received by the WCF 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.

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

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

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

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

Finally, the following code example shows how to modify the client configuration file to use the endpoint behavior with a particular endpoint.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Return to top
Show: