locked
ChannelFactory<T> and async

    Question

  • 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
    Thursday, November 04, 2010 9:05 PM

Answers

  • 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:04 PM

All replies

  • 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:04 PM
  • This is the answer I was hoping for! Can't wait for this to be released. Great work guys!
    bh
    Thursday, November 04, 2010 10:24 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

     

    Saturday, November 13, 2010 8:58 PM
  • That is just fantastic!

    Great work guys!

     

     

    Vincent-Philippe Lauzon


    Vincent-Philippe
    Friday, June 03, 2011 3:28 PM