C# implementation of the deferred pattern, as seen in jQuery