IParameterInspector and OneWay Operations

Link. September 28, 2006. Comments [0]. Posted in: WCF | WinFX

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.



Comments are closed.

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Links

Categories

Statistics

Total Posts: 1022
This Year: 92
This Month: 11
This Week: 0
Comments: 792

Blogroll

Post Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.1.8139.823

Sign In