ByteArrayContent.CreateContentReadStream(CancellationToken) 方法

定义

创建用于读取的 HTTP 内容流。 它使用 ByteArrayContent 中的内存作为后备存储。

C#
protected override System.IO.Stream CreateContentReadStream (System.Threading.CancellationToken cancellationToken);

参数

cancellationToken
CancellationToken

用于取消操作的取消令牌。

返回

HTTP 内容流。

例外

取消令牌已取消。 此异常存储在返回的任务中。

适用于

产品 版本
.NET 5, 6, 7, 8, 9