我对C#异步调用还很陌生,所以请帮助我理解为什么对以下函数的调用会停留在等待行:
public async Task<string> UploadBlob(string containerName, string blobName, string blobText)
{
var blobContainer = this.cloudBlobClient.GetContainerReference(containerName);
Console.WriteLine("uploading blob now ....");
CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName);
await blob.UploadTextAsync(blobText); // gets stuck here
return blob.Uri.ToString();
}
我正在尝试将文本上传到azure blob存储,并想返回新上传的blob的uri。