BroadcastBlock<T> Class

 

Provides a buffer for storing at most one element at time, overwriting each message with the next as it arrives.

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

System::Object
System.Threading.Tasks.Dataflow::BroadcastBlock<T>

generic<typename T>
public ref class BroadcastBlock sealed : IPropagatorBlock<T, T>, 
	ITargetBlock<T>, IReceivableSourceBlock<T>, ISourceBlock<T>, 
	IDataflowBlock

Type Parameters

T

Specifies the type of the data buffered by this dataflow block.

NameDescription
System_CAPS_pubmethodBroadcastBlock<T>(Func<T, T>^)

Initializes the BroadcastBlock<T> with the specified cloning function.

System_CAPS_pubmethodBroadcastBlock<T>(Func<T, T>^, DataflowBlockOptions^)

Initializes the BroadcastBlock<T> with the specified cloning function and DataflowBlockOptions.

NameDescription
System_CAPS_pubpropertyCompletion

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

NameDescription
System_CAPS_pubmethodComplete()

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

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodLinkTo(ITargetBlock<T>^, DataflowLinkOptions^)

Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>.

System_CAPS_pubmethodToString()

Returns a string that represents the formatted name of this IDataflowBlock instance.(Overrides Object::ToString().)

System_CAPS_pubmethodTryReceive(Predicate<T>^, T)

Attempts to synchronously receive an available output item from the IReceivableSourceBlock<TOutput>.

NameDescription
System_CAPS_pubmethodAsObservable<T>()

Creates a new IObservable<T> abstraction over the ISourceBlock<TOutput>.(Defined by DataflowBlock.)

System_CAPS_pubmethodAsObserver<T>()

Creates a new IObserver<T> abstraction over the ITargetBlock<TInput>. (Defined by DataflowBlock.)

System_CAPS_pubmethodLinkTo<T>(ITargetBlock<T>^)

Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput>. (Defined by DataflowBlock.)

System_CAPS_pubmethodLinkTo<T>(ITargetBlock<T>^, DataflowLinkOptions^, Predicate<T>^)

Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. (Defined by DataflowBlock.)

System_CAPS_pubmethodLinkTo<T>(ITargetBlock<T>^, Predicate<T>^)

Overloaded. Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> using the specified filter. (Defined by DataflowBlock.)

System_CAPS_pubmethodOutputAvailableAsync<T>()

Overloaded. Provides a Task<TResult> that asynchronously monitors the source for available output.(Defined by DataflowBlock.)

System_CAPS_pubmethodOutputAvailableAsync<T>(CancellationToken)

Overloaded. Provides a Task<TResult> that asynchronously monitors the source for available output. (Defined by DataflowBlock.)

System_CAPS_pubmethodPost<T>(T)

Posts an item to the ITargetBlock<TInput>.(Defined by DataflowBlock.)

System_CAPS_pubmethodReceive<T>()

Overloaded. Synchronously receives a value from a specified source.(Defined by DataflowBlock.)

System_CAPS_pubmethodReceive<T>(CancellationToken)

Overloaded. Synchronously receives a value from a specified source and provides a token to cancel the operation. (Defined by DataflowBlock.)

System_CAPS_pubmethodReceive<T>(TimeSpan)

Overloaded. Synchronously receives a value from a specified source, observing an optional time-out period.(Defined by DataflowBlock.)

System_CAPS_pubmethodReceive<T>(TimeSpan, CancellationToken)

Overloaded. Synchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval. (Defined by DataflowBlock.)

System_CAPS_pubmethodReceiveAsync<T>()

Overloaded. Asynchronously receives a value from a specified source.(Defined by DataflowBlock.)

System_CAPS_pubmethodReceiveAsync<T>(CancellationToken)

Overloaded. Asynchronously receives a value from a specified source and provides a token to cancel the operation. (Defined by DataflowBlock.)

System_CAPS_pubmethodReceiveAsync<T>(TimeSpan)

Overloaded. Asynchronously receives a value from a specified source, observing an optional time-out period.(Defined by DataflowBlock.)

System_CAPS_pubmethodReceiveAsync<T>(TimeSpan, CancellationToken)

Overloaded. Asynchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval. (Defined by DataflowBlock.)

System_CAPS_pubmethodSendAsync<T>(T)

Overloaded. Asynchronously offers a message to the target message block, allowing for postponement.(Defined by DataflowBlock.)

System_CAPS_pubmethodSendAsync<T>(T, CancellationToken)

Overloaded. Asynchronously offers a message to the target message block, allowing for postponement.(Defined by DataflowBlock.)

System_CAPS_pubmethodTryReceive<T>(T)

Attempts to synchronously receive an item from the ISourceBlock<TOutput>.(Defined by DataflowBlock.)

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

BroadcastBlock<T> exposes at most one element at a time. However, unlike WriteOnceBlock<T>, that element will be overwritten as new elements are provided to the block. BroadcastBlock<T> ensures that the current element is broadcast to any linked targets before allowing the element to be overwritten.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: