ITargetBlock<TInput> ITargetBlock<TInput> ITargetBlock<TInput> ITargetBlock<TInput> Interface

Definition

Represents a dataflow block that is a target for data.

generic <typename TInput>
public interface class ITargetBlock : System::Threading::Tasks::Dataflow::IDataflowBlock
public interface ITargetBlock<in TInput> : System.Threading.Tasks.Dataflow.IDataflowBlock
type ITargetBlock<'Input> = interface
    interface IDataflowBlock
Public Interface ITargetBlock(Of In TInput)
Implements IDataflowBlock

Type Parameters

TInput

Specifies the type of data accepted by the ITargetBlock<TInput>.

Derived
Implements

Remarks

Note

The TPL Dataflow Library (the System.Threading.Tasks.Dataflow namespace) is not distributed with .NET. To install the System.Threading.Tasks.Dataflow namespace in Visual Studio, open your project, choose Manage NuGet Packages from the Project menu, and search online for the System.Threading.Tasks.Dataflow package. Alternatively, to install it using the .NET Core CLI, run dotnet add package System.Threading.Tasks.Dataflow.

Methods

Complete() Complete() Complete() Complete()

Signals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages.

(Inherited from IDataflowBlock)
Fault(Exception) Fault(Exception) Fault(Exception) Fault(Exception)

Causes the IDataflowBlock to complete in a Faulted state.

(Inherited from IDataflowBlock)
OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean) OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean) OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean) OfferMessage(DataflowMessageHeader, TInput, ISourceBlock<TInput>, Boolean)

Offers a message to the ITargetBlock<TInput>, giving the target the opportunity to consume or postpone the message.

Properties

Completion Completion Completion Completion

Gets a Task that represents the asynchronous operation and completion of the dataflow block.

(Inherited from IDataflowBlock)

Extension Methods

AsObserver<TInput>(ITargetBlock<TInput>) AsObserver<TInput>(ITargetBlock<TInput>) AsObserver<TInput>(ITargetBlock<TInput>) AsObserver<TInput>(ITargetBlock<TInput>)

Creates a new IObserver<T> abstraction over the ITargetBlock<TInput>.

Post<TInput>(ITargetBlock<TInput>, TInput) Post<TInput>(ITargetBlock<TInput>, TInput) Post<TInput>(ITargetBlock<TInput>, TInput) Post<TInput>(ITargetBlock<TInput>, TInput)

Posts an item to the ITargetBlock<TInput>.

SendAsync<TInput>(ITargetBlock<TInput>, TInput) SendAsync<TInput>(ITargetBlock<TInput>, TInput) SendAsync<TInput>(ITargetBlock<TInput>, TInput) SendAsync<TInput>(ITargetBlock<TInput>, TInput)

Asynchronously offers a message to the target message block, allowing for postponement.

SendAsync<TInput>(ITargetBlock<TInput>, TInput, CancellationToken) SendAsync<TInput>(ITargetBlock<TInput>, TInput, CancellationToken) SendAsync<TInput>(ITargetBlock<TInput>, TInput, CancellationToken) SendAsync<TInput>(ITargetBlock<TInput>, TInput, CancellationToken)

Asynchronously offers a message to the target message block, allowing for postponement.

Applies to