Based on the SO question: How to use IDispatchMessageInspector in a WCF Service?
I am still confused on where to implement the methods that execute code to "do something" with the inspected message.
From reading IDispatchMessageInspector it appears that I need to have a class that implements IDispatchMessageInspector
which has these two methods AfterReceiveRequest
and BeforeSendReply
.
However, I am not understanding where to or how to use those methods.
For example if I wanted to modify an element in the inbound request message before it was dispatched to its operation.
Is this done in the class I create for the servicebehavior which implements my ServiceContract
Interface?