Export (0) Print
Expand All

ITargetBlock<TInput> Interface

.NET Framework 4.5

Represents a dataflow block that is a target for data.

Namespace:  System.Threading.Tasks.Dataflow
Assembly:  System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)

public interface ITargetBlock<in TInput> : IDataflowBlock

Type Parameters

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

The ITargetBlock<TInput> type exposes the following members.

  NameDescription
Public propertySupported by Portable Class LibraryCompletionGets a Task that represents the asynchronous operation and completion of the dataflow block. (Inherited from IDataflowBlock.)
Top

  NameDescription
Public methodSupported by Portable Class LibraryCompleteSignals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages. (Inherited from IDataflowBlock.)
Public methodSupported by Portable Class LibraryFaultCauses the IDataflowBlock to complete in a Faulted state. (Inherited from IDataflowBlock.)
Public methodSupported by Portable Class LibraryOfferMessageOffers a message to the ITargetBlock<TInput>, giving the target the opportunity to consume or postpone the message.
Top

  NameDescription
Public Extension MethodSupported by Portable Class LibraryAsObserver<TInput>Creates a new IObserver<T> abstraction over the ITargetBlock<TInput>. (Defined by DataflowBlock.)
Public Extension MethodSupported by Portable Class LibraryPost<TInput>Posts an item to the ITargetBlock<TInput>. (Defined by DataflowBlock.)
Public Extension MethodSupported by Portable Class LibrarySendAsync<TInput>(TInput)Overloaded. Asynchronously offers a message to the target message block, allowing for postponement. (Defined by DataflowBlock.)
Public Extension MethodSupported by Portable Class LibrarySendAsync<TInput>(TInput, CancellationToken)Overloaded. Asynchronously offers a message to the target message block, allowing for postponement. (Defined by DataflowBlock.)
Top

NoteNote

The TPL Dataflow Library (System.Threading.Tasks.Dataflow namespace) is not distributed with the .NET Framework 4.5. To install the System.Threading.Tasks.Dataflow namespace, open your project in Visual Studio 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Tpl.Dataflow package.

.NET Framework

Supported in: 4.5

Portable Class Library

Supported in: Portable Class Library

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft