Created
April 7, 2012 20:46
-
-
Save coldacid/2332024 to your computer and use it in GitHub Desktop.
Generic AsyncCompletedEventArgs class for simple EAP async return values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.ComponentModel | |
{ | |
public class AsyncCompletedEventArgs<T> : AsyncCompletedEventArgs | |
{ | |
private T result; | |
public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState) | |
: base(error, cancelled, userState) | |
{ } | |
public AsyncCompletedEventArgs(T result, object userState) | |
: base(null, false, userState) | |
{ | |
this.result = result; | |
} | |
public T Result | |
{ | |
get { return result; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: forgot that having the result constructor on its own would hide the base constructor. That problem's been fixed with this newer version.