Your code has a problem: callback(state). 'callback' which is of type
AsyncCallback expects IAsyncResult parameter, not the Object.


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Barry Kelly
Sent: Monday, July 10, 2006 13:13
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] Chaining the async design pattern

"Ivanoff, Alex" <[EMAIL PROTECTED]> wrote:

> A while back there was a discussion about chaining async pattern:
>
> http://discuss.develop.com/archives/wa.exe?A2=ind0401E&L=ADVANCED-DOTN
> ET&P=R
> 2&I=-3
> http://discuss.develop.com/archives/wa.exe?A2=ind0402A&L=ADVANCED-DOTN
> ET&D=0
> &I=-3&P=390
>
> I have the same situation and was wandering if someone has come up
> with a better solution.

You might want to check out my most recent blog entry, using anonymous
delegates to implement continuation passing style, to make creating
asynchronous methods almost mechanical.

http://barrkel.blogspot.com/2006/07/fun-with-asynchronous-methods-and.html

Implementing chaining would be pretty easy with it, since all the code can
be put in one method, the Begin method.

-- Barry

--
http://barrkel.blogspot.com/

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to