示例#1
0
 /// <summary>
 /// Download data to the stream.
 /// </summary>
 /// <param name="blob">The cloud blob.</param>
 /// <param name="target">The byte array where to write to.</param>
 /// <param name="index">The offset index.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 /// <returns>The async task.</returns>
 public async Task <int> DownloadAsync(CloudPageBlob blob, byte[] target, int index, CancellationToken cancellationToken)
 {
     return(await blob.DownloadToByteArrayAsync(target, index, cancellationToken));
 }
示例#2
0
 public static int DownloadToByteArray(this CloudPageBlob blob, byte[] buffer, int index)
 {
     return(blob.DownloadToByteArrayAsync(buffer, index).Result);
 }
示例#3
0
 /// <summary>
 /// Download data to the stream.
 /// </summary>
 /// <param name="blob">The cloud blob.</param>
 /// <param name="target">The byte array where to write to.</param>
 /// <param name="index">The offset index.</param>
 /// <returns>The async task.</returns>
 public async Task <int> DownloadAsync(CloudPageBlob blob, byte[] target, int index)
 {
     return(await blob.DownloadToByteArrayAsync(target, index));
 }