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

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.

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