DataflowBlock.OutputAvailableAsync 方法
定义
重载
| OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken) |
提供 Task<TResult>,用于以异步方式监视可用输出的源。Provides a Task<TResult> that asynchronously monitors the source for available output. |
| OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>) |
提供可异步监视可利用的输出的源的 Task<TResult> 。Provides a Task<TResult> that asynchronously monitors the source for available output. |
OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)
提供 Task<TResult>,用于以异步方式监视可用输出的源。Provides a Task<TResult> that asynchronously monitors the source for available output.
public:
generic <typename TOutput>
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task<bool> ^ OutputAvailableAsync(System::Threading::Tasks::Dataflow::ISourceBlock<TOutput> ^ source, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task<bool> OutputAvailableAsync<TOutput> (this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source, System.Threading.CancellationToken cancellationToken);
static member OutputAvailableAsync : System.Threading.Tasks.Dataflow.ISourceBlock<'Output> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function OutputAvailableAsync(Of TOutput) (source As ISourceBlock(Of TOutput), cancellationToken As CancellationToken) As Task(Of Boolean)
类型参数
- TOutput
指定源中所包含的数据的类型。Specifies the type of data contained in the source.
参数
- source
- ISourceBlock<TOutput>
对监视的源。The source to monitor.
- cancellationToken
- CancellationToken
用于取消异步操作的取消标记。The cancellation token with which to cancel the asynchronous operation.
返回
Task<TResult> 通知多个输出是否可用和何时可用。A Task<TResult> that informs of whether and when more output is available. 如果在任务完成时,它的 Result 是 true,更多输出在源处是可用的 (尽管源的另一个使用者可能检索数据)。If, when the task completes, its Result is true, more output is available in the source (though another consumer of the source may retrieve the data). 如果它返回 false,则会因为在提供输入之前完成的源而导致更多输出不可用。If it returns false, more output is not and will never be available, due to the source completing prior to output being available.
适用于
OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)
提供可异步监视可利用的输出的源的 Task<TResult> 。Provides a Task<TResult> that asynchronously monitors the source for available output.
public:
generic <typename TOutput>
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task<bool> ^ OutputAvailableAsync(System::Threading::Tasks::Dataflow::ISourceBlock<TOutput> ^ source);
public static System.Threading.Tasks.Task<bool> OutputAvailableAsync<TOutput> (this System.Threading.Tasks.Dataflow.ISourceBlock<TOutput> source);
static member OutputAvailableAsync : System.Threading.Tasks.Dataflow.ISourceBlock<'Output> -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function OutputAvailableAsync(Of TOutput) (source As ISourceBlock(Of TOutput)) As Task(Of Boolean)
类型参数
- TOutput
指定源中所包含的数据的类型。Specifies the type of data contained in the source.
参数
- source
- ISourceBlock<TOutput>
对监视的源。The source to monitor.
返回
Task<TResult> 通知多个输出是否可用和何时可用。A Task<TResult> that informs of whether and when more output is available. 如果在任务完成时,它的 Result 是 true,更多输出在源处是可用的 (尽管源的另一个使用者可能检索数据)。If, when the task completes, its Result is true, more output is available in the source (though another consumer of the source may retrieve the data).
如果它返回 false,则会因为在提供输入之前完成的源而导致更多输出不可用。If it returns false, more output is not and will never be available, due to the source completing prior to output being available.