Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Last active July 21, 2018 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idiotandrobot/ca87bfb9d236e4103cdef75957289a59 to your computer and use it in GitHub Desktop.
Save idiotandrobot/ca87bfb9d236e4103cdef75957289a59 to your computer and use it in GitHub Desktop.
async/await in Windows Runtime Components
public async Task DoSomethingAsync()
{
await SomethingElseAsync();
}
public async Task<Foo> DoAnotherAsync()
{
return await ReturnAFooAsync();
}
public IAsyncAction GetDoSomethingAsync()
{
return DoSomethingAsync().AsAsyncAction();
}
internal async Task DoSomethingAsync()
{
await SomethingElseAsync();
}
public IAsyncOperation<Foo> GetDoAnotherAsync()
{
return DoAnotherAsync().AsAsyncOperation();
}
internal async Task<Foo> DoAnotherAsync()
{
return await ReturnAFooAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment