ภาษา

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>.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Derived
Implements

Properties

Name Description
Completion

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

(Inherited from IDataflowBlock)

Methods

Name Description
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)

Causes the IDataflowBlock to complete in a Faulted state.

(Inherited from IDataflowBlock)
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

Name Description
AsObserver<TInput>(ITargetBlock<TInput>)

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

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

Posts an item to the ITargetBlock<TInput>.

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

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

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

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

Applies to