你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CloudFile.DownloadToByteArrayAsync 方法

定义

重载

DownloadToByteArrayAsync(Byte[], Int32)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

DownloadToByteArrayAsync(Byte[], Int32, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

DownloadToByteArrayAsync(Byte[], Int32)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member DownloadToByteArrayAsync : byte[] * int -> System.Threading.Tasks.Task<int>
override this.DownloadToByteArrayAsync : byte[] * int -> System.Threading.Tasks.Task<int>
Public Overridable Function DownloadToByteArrayAsync (target As Byte(), index As Integer) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量。

返回

一个表示当前操作的 Task 对象。

属性

适用于

DownloadToByteArrayAsync(Byte[], Int32, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member DownloadToByteArrayAsync : byte[] * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.DownloadToByteArrayAsync : byte[] * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overridable Function DownloadToByteArrayAsync (target As Byte(), index As Integer, cancellationToken As CancellationToken) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

一个表示当前操作的 Task 对象。

属性

适用于

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<int>
override this.DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<int>
Public Overridable Function DownloadToByteArrayAsync (target As Byte(), index As Integer, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量。

accessCondition
AccessCondition

一个表示文件访问条件的 AccessCondition 对象。

options
FileRequestOptions

一个 FileRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

返回

一个表示当前操作的 Task 对象。

属性

适用于

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overridable Function DownloadToByteArrayAsync (target As Byte(), index As Integer, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量。

accessCondition
AccessCondition

一个表示文件访问条件的 AccessCondition 对象。

options
FileRequestOptions

一个 FileRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

一个表示当前操作的 Task 对象。

属性

适用于

DownloadToByteArrayAsync(Byte[], Int32, AccessCondition, FileRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

返回一个任务,该任务执行异步操作,将文件的内容下载到字节数组。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> progressHandler, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.DownloadToByteArrayAsync : byte[] * int * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overridable Function DownloadToByteArrayAsync (target As Byte(), index As Integer, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext, progressHandler As IProgress(Of StorageProgress), cancellationToken As CancellationToken) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量。

accessCondition
AccessCondition

一个表示文件访问条件的 AccessCondition 对象。

options
FileRequestOptions

一个 FileRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

progressHandler
IProgress<StorageProgress>

用于 IProgress<T> 处理 StorageProgress 消息的 对象。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

一个表示当前操作的 Task 对象。

属性

适用于