I am trying to pass in some data to the continuation method once UploadAsync finishes. I can read the AsyncState from withing the method, but I don't know how to set it from outside?
Here is a sample of what I have so far:
Action<Task<IUploadProgress>> myAction = (input) =>
{
object asyncState = input.AsyncState;
IUploadProgress result = input.Result;
};
Task<IUploadProgress> uploadTask = service.Objects.Insert(myObject, bucketName, stream, "").UploadAsync();
uploadTask.ContinueWith(myAction);
uploadTask.Wait();
Thanks.