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

ContainerRegistryContentClient.DownloadBlobToAsync 方法

定义

重载

DownloadBlobToAsync(String, Stream, CancellationToken)

将 Blob 下载到传入的目标流。 此方法将以连续字节块形式将 Blob 下载到目标流。

DownloadBlobToAsync(String, String, CancellationToken)

将 Blob 下载到 path 参数指定的文件。

DownloadBlobToAsync(String, Stream, CancellationToken)

Source:
ContainerRegistryContentClient.cs
Source:
ContainerRegistryContentClient.cs

将 Blob 下载到传入的目标流。 此方法将以连续字节块形式将 Blob 下载到目标流。

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadBlobToAsync(string digest, System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadBlobToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadBlobToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadBlobToAsync (digest As String, destination As Stream, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

参数

digest
String

要下载的 Blob 的摘要。

destination
Stream

下载的 Blob 的目标。

cancellationToken
CancellationToken

要使用的取消标记。

返回

对应于最终 GET Blob 区块请求的原始响应。

例外

如果 destination 为 null。

容器注册表服务返回故障时引发。

适用于

DownloadBlobToAsync(String, String, CancellationToken)

Source:
ContainerRegistryContentClient.cs
Source:
ContainerRegistryContentClient.cs

将 Blob 下载到 path 参数指定的文件。

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadBlobToAsync(string digest, string path, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadBlobToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadBlobToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadBlobToAsync (digest As String, path As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

参数

digest
String

要下载的 Blob 的摘要。

path
String

要向其写入下载内容的文件路径。

cancellationToken
CancellationToken

要使用的取消标记。

返回

对应于最终 GET Blob 区块请求的原始响应。

例外

如果 path 为 null。

容器注册表服务返回故障时引发。

适用于