Home How to convert IAsync to Task Await Async
Post
Cancel

How to convert IAsync to Task Await Async

1
var result = await Task<OssObject>.Factory.FromAsync(client.BeginGetObject, client.EndGetObject, bucketName, key, null);

OssObject is the return object in method click.BeginGetObject

client.EndGetObject is the method which gets called once the BeginGetObject has completed.

bucketName happens to be an argument passed into BeginGetObject.

This post is licensed under CC BY 4.0 by the author.