Thursday 19 May 2011

Chain of Command pattern with Tasks

You can create a new thread and that can run a series of sequential methods, with the result of each passed onto it’s successor using Tasks and the ContinueWith keyword. 

The example below uses a fluent interface to chain each method together:

image

No comments:

Post a Comment