Skip to content

Instantly share code, notes, and snippets.

@benaadams
Created January 20, 2018 00:14
Show Gist options
  • Select an option

  • Save benaadams/f79c9564d32ef9aa7fb657af232bce27 to your computer and use it in GitHub Desktop.

Select an option

Save benaadams/f79c9564d32ef9aa7fb657af232bce27 to your computer and use it in GitHub Desktop.
public interface IAwaitable<out TResult> : ICriticalNotifyCompletion
{
bool IsCompleted { get; }
TResult GetResult();
}
public static class AwaitableExtensions
{
public static IAwaitable<TResult> GetAwaiter<TResult>(this IAwaitable<TResult> source)
{
return source;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment