Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

.net

wcf

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

like image 724
marcelo-ferraz Avatar asked Sep 25 '12 18:09

marcelo-ferraz


2 Answers

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.

like image 65
carlosfigueira Avatar answered Oct 23 '22 00:10

carlosfigueira


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.

like image 26
ErnieL Avatar answered Oct 23 '22 01:10

ErnieL