I talked before about the IParameterInspector extension interface in Windows Communication Foundation. One topic I didn't cover was the behavior of IParameterInspector in relation to one way operations in WCF services. I'm refering here to operations explicitly marked with [OperationContract(IsOneWay=true)].

With OneWay operations, the behavior of IParameterInspector is different in the server and client side:

On the server (dispatcher) side, both BeforeCall() and AfterCall() will be called normally. On AfterCall(), the outputs parameter array will be of zero-length and the returnValue argument will be null, as expected.

On the client (proxy) side, however, the AfterCall() method in your IParameterInspector implementation will never be called by the runtime. While this makes sense, it might not have been what you expected, so be mindful of this little fact.

Tomas Restrepo

Software developer located in Colombia.