Click here to Skip to main content
15,885,244 members
Articles / Programming Languages / C#

A Simple Solution to Some Problems with Asynchrony in Silverlight

Rate me:
Please Sign up or sign in to vote.
4.69/5 (8 votes)
9 Mar 2010CPOL15 min read 24.9K   128   25  
A small, extensible suite of classes that elegantly solve some common problems involving asynchrony and event handling that tend to occur when Silverlight and WCF are used together.
namespace TaskManagerDemo.Utility
{
    /// <summary>
    /// This class wraps TaskManager and renames it for the sole purpose of making one of its important uses more obvious.
    /// In general, a high-level task that aggregates several AsyncServiceCallManager objects should be represented by a
    /// TaskManager oject, whereas each sub-task that relates to calling an async service method and processing its results
    /// via an ...AsyncCompleted event handler should be represented by an AsyncServiceCallManager. The two classes are
    /// functionally interchangeable but using objects of the respective classes as recommended here serves a documentary
    /// purpose.
    /// </summary>
    public class AsyncServiceCallManager : TaskManager
    {
        public AsyncServiceCallManager(string name) : base(name) { }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Concur
United States United States
George Henry has worked as a software developer for more than 20 years. He is currently employed by Concur in Bellevue, Washington, USA.

Comments and Discussions