StreamHelperExtensions.DrainAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
DrainAsync(Stream, CancellationToken) |
将指定的 此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。 |
DrainAsync(Stream, Nullable<Int64>, CancellationToken) |
将指定的 此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。 |
DrainAsync(Stream, ArrayPool<Byte>, Nullable<Int64>, CancellationToken) |
将指定的 此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。 |
DrainAsync(Stream, CancellationToken)
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
将指定的 stream
读取到末尾。
此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ DrainAsync(System::IO::Stream ^ stream, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task DrainAsync (this System.IO.Stream stream, System.Threading.CancellationToken cancellationToken);
static member DrainAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function DrainAsync (stream As Stream, cancellationToken As CancellationToken) As Task
参数
- cancellationToken
- CancellationToken
要监视取消请求的标记。
返回
适用于
DrainAsync(Stream, Nullable<Int64>, CancellationToken)
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
将指定的 stream
读取到末尾。
此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ DrainAsync(System::IO::Stream ^ stream, Nullable<long> limit, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task DrainAsync (this System.IO.Stream stream, long? limit, System.Threading.CancellationToken cancellationToken);
static member DrainAsync : System.IO.Stream * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function DrainAsync (stream As Stream, limit As Nullable(Of Long), cancellationToken As CancellationToken) As Task
参数
- cancellationToken
- CancellationToken
要监视取消请求的标记。
返回
适用于
DrainAsync(Stream, ArrayPool<Byte>, Nullable<Int64>, CancellationToken)
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
- Source:
- StreamHelperExtensions.cs
将指定的 stream
读取到末尾。
此 API 与缓冲结合使用时有效。 它允许在完全清空后同步读取缓冲的请求流。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ DrainAsync(System::IO::Stream ^ stream, System::Buffers::ArrayPool<System::Byte> ^ bytePool, Nullable<long> limit, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task DrainAsync (this System.IO.Stream stream, System.Buffers.ArrayPool<byte> bytePool, long? limit, System.Threading.CancellationToken cancellationToken);
static member DrainAsync : System.IO.Stream * System.Buffers.ArrayPool<byte> * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function DrainAsync (stream As Stream, bytePool As ArrayPool(Of Byte), limit As Nullable(Of Long), cancellationToken As CancellationToken) As Task
参数
- cancellationToken
- CancellationToken
要监视取消请求的标记。