0

我正在使用 Azure SDK v2.1.0.0。我在 CloudBlockBlob 类中找到了一个名为 DownloadRangeToByteArray 的方法,但遗憾的是我在在线 MSDN 中找不到任何关于它的文档?

关于它的用法、约束、线程安全的任何想法?

4

2 回答 2

1

来自 Azure 存储客户端库的 GitHub 存储库https://github.com/WindowsAzure/azure-sdk-for-net/blob/583799d5238ffb72b8d9244604558a83ed4372f8/microsoft-azure-api/Services/Storage/Lib/DotNetCommon/Blob/ICloudBlob.cs

    /// <summary>
    /// Downloads the contents of a blob to a byte array.
    /// </summary>
    /// <param name="target">The target byte array.</param>
    /// <param name="index">The starting offset in the byte array.</param>
    /// <param name="blobOffset">The starting offset of the data range, in bytes.</param>
    /// <param name="length">The length of the data range, in bytes.</param>
    /// <param name="accessCondition">An <see cref="AccessCondition"/> object that represents the access conditions for the blob.</param>
    /// <param name="options">A <see cref="BlobRequestOptions"/> object that specifies any additional options for the request.</param>
    /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param>
    /// <returns>The total number of bytes read into the buffer.</returns>
    int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null);
于 2013-09-11T15:13:13.857 回答
0

对于延迟,我深表歉意,内部发布链中存在导致文档被搁置的问题。他们应该很快就会出来。

同时,上面的 GitHub 信息是正确的,此方法的想法是它允许您指定 blob 字节的范围(而不是整个 blob),以直接下载到给定索引处的字节数组中。

于 2013-09-16T22:02:54.093 回答