Last active
August 29, 2015 14:02
-
-
Save renestein/54fc961c87dd9f521034 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public virtual Action Wrap(Action action) | |
{ | |
checkIfDisposed(); | |
if (action == null) | |
{ | |
throw new ArgumentNullException("action"); | |
} | |
return () => Dispatch(action); | |
} | |
public virtual Action Wrap(Func<Task> function) | |
{ | |
checkIfDisposed(); | |
if (function == null) | |
{ | |
throw new ArgumentNullException("function"); | |
} | |
return () => Dispatch(function); | |
} | |
public virtual Func<Task> WrapAsTask(Action action) | |
{ | |
checkIfDisposed(); | |
if (action == null) | |
{ | |
throw new ArgumentNullException("action"); | |
} | |
return () => Dispatch(action); | |
} | |
public virtual Func<Task> WrapAsTask(Func<Task> function) | |
{ | |
checkIfDisposed(); | |
if (function == null) | |
{ | |
throw new ArgumentNullException("function"); | |
} | |
return () => Dispatch(function); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment