What is a proper implementation of the IAsyncResult interface?

后端 未结 2 1204
太阳男子
太阳男子 2021-02-19 11:26

I\'m looking into adding some flexibility to a class that I\'ve created which establishes a connection to a remote host and then performs an exchange of information (a handshake

相关标签:
2条回答
  • 2021-02-19 11:56

    You can wrap the invocation in the IAsyncResult implementation. Since I've been looking at multithreading lately, I've posted about it here (it has links to other implementations of the interface too):

    http://msmvps.com/blogs/luisabreu/archive/2009/06/15/multithreading-implementing-the-iasyncresult-interface.aspx

    0 讨论(0)
  • 2021-02-19 12:07
    • Jeffery Richter (MSDN Magazine)
    • Microsoft's WCF Samples
    • Niko Schuessler (MS employee)
    • Google "IAsyncResult Implementation" for more...

    You also have many implementations in the BCL (e.g. System.Runtime.Remoting.Messaging.AsyncResult) - use reflector or the reference source to check them out.

    0 讨论(0)
提交回复
热议问题