Last active
August 29, 2015 14:20
-
-
Save programmation/993eee805c6f837bb230 to your computer and use it in GitHub Desktop.
Async no-op
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
// http://blog.stephencleary.com/2015/04/a-tour-of-task-part-10-promise-tasks.html | |
interface IPlugin | |
{ | |
// Permit each plugin to initialize asynchronously. | |
Task InitializeAsync(); | |
} | |
class MyPlugin : IPlugin | |
{ | |
public Task InitializeAsync() | |
{ | |
// The async equivalent of a noop. | |
return Task.FromResult<object>(null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment