2

I found in MSDN that ChannelFactory-based client cannot use event-driven asynchronous calling model, but a ServiceModel.ClientBase-based client can

How is this justified? What are the reasons for it? Here is the MSDN link http://msdn.microsoft.com/en-us/library/ms731177.

Vivin joy
  • 97
  • 7
  • If u read the msdn link, that i have provided, they would had said that u cant use event driven asynchronous calling model for ChannelFactory - based client. I just wanna know why. – Vivin joy Sep 13 '12 at 13:15
  • 1
    The article does not even mention ChannelFactory. – tom redfern Sep 13 '12 at 13:37
  • 1
    @hugh - [here is the link stating that `ChannelFactory` isn't supported via event-driven async pattern](http://msdn.microsoft.com/en-us/library/ms730059). – SliverNinja - MSFT Sep 13 '12 at 13:39

1 Answers1

1

ClientBase is a wrapper around ChannelFactory. ClientBase was intended to work with svcutil.exe to enable direct support via the /async flag for both event-based and callback/delegate-based asynchronous methods.

The ChannelFactory itself has no knowledge of the Begin/End pattern, so you need to use ClientBase to achieve the built-in async-awareness or create it yourself with ChannelFactory.

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173