Lambdas, Extension Methods, and Asynchronous Execution Example
by Bogdan Varlamov (a.k.a. Phantom Stranger)
- Published:September 8th, 2009
- Comments:No Comment
- Category:.NET 3.5, .NET Framework, Tricks, Utilities
I've often found myself working on a class in some legacy application using objects hidden away in third-party libraries and thinking, "Wow... it would be really great if I could call this current existing method but have it process asynchronously (without blocking) and then notify me when it is complete."
The only way to do this would be to inherit the legacy object and add a new "Async" version of the method, right? And what about those pesky sealed classes? Not to mention the problems with having to refactor your whole application (and perhaps any dependent components used by other applications).
It can be quite a mess! But, luckily there is a simpler way...
Would you like to know more?


