Rediger

Del via


DataflowBlock.OutputAvailableAsync Method

Definition

Overloads

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

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)

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source to monitor.

cancellationToken
CancellationToken

The cancellation token with which to cancel the asynchronous operation.

Returns

A Task<TResult> that informs of whether and when more output is available. 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). If it returns false, more output is not and will never be available, due to the source completing prior to output being available.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Source:
DataflowBlock.cs
Source:
DataflowBlock.cs
Source:
DataflowBlock.cs

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)

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
ISourceBlock<TOutput>

The source to monitor.

Returns

A Task<TResult> that informs of whether and when more output is available. 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).

If it returns false, more output is not and will never be available, due to the source completing prior to output being available.

Applies to