Locked ChannelFactory<T> and async

  • Thursday, November 04, 2010 9:05 PM
     
      Has Code

    In the following scenario:

    var fact = new ChannelFactory<TServiceContract>();
    var ch = fact.CreateChannel();

    ch.CallSomeService();

    can we hope for something like ChannelFactoryAsync<> that would generate a channel with async methods, so we can do

    await ch.CallSomeService();

     


    bh

All Replies

  • Thursday, November 04, 2010 10:04 PM
     
     Answered

    Hello bankoh,

    We are currently working on adding the support for Task-based operations in WCF clients. This support will be available to users who rely on proxies generated by our client generation tools (svcutil.exe, Add Service Reference) as well as to users who prefer to directly use ChannelFactory<T>. Therefore, the scenario you have highlighted in your post will be supported in .NET 4.5.

    Let me know if that answers your question, or if you have any other concern about this.

    Amadeo

     

  • Thursday, November 04, 2010 10:24 PM
     
     
    This is the answer I was hoping for! Can't wait for this to be released. Great work guys!
    bh
  • Saturday, November 13, 2010 8:58 PM
     
     

    In addition to this, if you would like to know more about WCF adoption of the async/await model, take a look at the following blog post:

    http://blogs.msdn.com/b/endpoint/archive/2010/11/13/simplified-asynchronous-programming-model-in-wcf-with-async-await.aspx

    Amadeo

     

  • Friday, June 03, 2011 3:28 PM
     
     

    That is just fantastic!

    Great work guys!

     

     

    Vincent-Philippe Lauzon


    Vincent-Philippe