marcelo-ferraz
marcelo-ferraz

Reputation: 3257

What does WCF with the return of the method IDispatchMessageInspector.AfterReceiveRequest?

What does WCF with the return of the method IDispatchMessageInspector.AfterReceiveRequest?
All I have encountered was return null; examples.

Upvotes: 5

Views: 1678

Answers (2)

carlosfigueira
carlosfigueira

Reputation: 87228

It passes the value to the BeforeSendReply method, and it can be used to correlate the two calls. You can find one example of a non-null value being returned in the example on the post at http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/19/wcf-extensibility-message-inspectors.aspx.

Upvotes: 11

ErnieL
ErnieL

Reputation: 5801

WCF does nothing with the return value.

From IDispatchMessageInspector.AfterReceiveRequest Method:

The return value can be any object that you want to use for correlation purposes; it is returned to you as the correlationState parameter in the BeforeSendReply method.

Upvotes: 3

Related Questions