This topic has not yet been rated - Rate this topic

ISourceBlock<TOutput> Interface

.NET Framework 4.5

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a dataflow block that is a source of data.

Namespace:  System.Threading.Tasks.Dataflow
Assembly:  System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)
public interface ISourceBlock<out TOutput> : IDataflowBlock

Type Parameters

out TOutput

Specifies the type of data supplied by the ISourceBlock<TOutput>.

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

The ISourceBlock<TOutput> type exposes the following members.

  Name Description
Public property Completion Gets a Task that represents the asynchronous operation and completion of the dataflow block. (Inherited from IDataflowBlock.)
Top
  Name Description
Public method Complete Signals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages. (Inherited from IDataflowBlock.)
Public method ConsumeMessage Called by a linked ITargetBlock<TInput> to accept and consume a DataflowMessageHeader previously offered by this ISourceBlock<TOutput>.
Public method Fault Causes the IDataflowBlock to complete in a Faulted state. (Inherited from IDataflowBlock.)
Public method LinkTo Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>.
Public method ReleaseReservation Called by a linked ITargetBlock<TInput> to release a previously reserved DataflowMessageHeader by this ISourceBlock<TOutput>.
Public method ReserveMessage Called by a linked ITargetBlock<TInput> to reserve a previously offered DataflowMessageHeader by this ISourceBlock<TOutput>.
Top
  Name Description
Public Extension Method AsObservable<TOutput> Creates a new IObservable<T> abstraction over the ISourceBlock<TOutput>. (Defined by DataflowBlock.)
Public Extension Method LinkTo<TOutput>(ITargetBlock<TOutput>) Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>. (Defined by DataflowBlock.)
Public Extension Method LinkTo<TOutput>(ITargetBlock<TOutput>, Predicate<TOutput>) Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. (Defined by DataflowBlock.)
Public Extension Method LinkTo<TOutput>(ITargetBlock<TOutput>, DataflowLinkOptions, Predicate<TOutput>) Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. (Defined by DataflowBlock.)
Public Extension Method OutputAvailableAsync<TOutput>() Overloaded. Provides a Task<TResult> that asynchronously monitors the source for available output. (Defined by DataflowBlock.)
Public Extension Method OutputAvailableAsync<TOutput>(CancellationToken) Overloaded. Provides a Task<TResult> that asynchronously monitors the source for available output. (Defined by DataflowBlock.)
Public Extension Method Receive<TOutput>() Overloaded. Synchronously receives an item from the source. (Defined by DataflowBlock.)
Public Extension Method Receive<TOutput>(CancellationToken) Overloaded. Synchronously receives an item from the source. (Defined by DataflowBlock.)
Public Extension Method Receive<TOutput>(TimeSpan) Overloaded. Synchronously receives an item from the source. (Defined by DataflowBlock.)
Public Extension Method Receive<TOutput>(TimeSpan, CancellationToken) Overloaded. Synchronously receives an item from the source. (Defined by DataflowBlock.)
Public Extension Method ReceiveAsync<TOutput>() Overloaded. Asynchronously receives a value from the specified source. (Defined by DataflowBlock.)
Public Extension Method ReceiveAsync<TOutput>(CancellationToken) Overloaded. Asynchronously receives a value from the specified source. (Defined by DataflowBlock.)
Public Extension Method ReceiveAsync<TOutput>(TimeSpan) Overloaded. Asynchronously receives a value from the specified source. (Defined by DataflowBlock.)
Public Extension Method ReceiveAsync<TOutput>(TimeSpan, CancellationToken) Overloaded. Asynchronously receives a value from the specified source. (Defined by DataflowBlock.)
Top

.NET Framework

Supported in: 4.5

Windows 8 Consumer Preview, Windows Server 8 Beta, Windows 7, Windows Server 2008 SP2, 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.

Did you find this helpful?
(1500 characters remaining)