Επεξεργασία

Κοινή χρήση μέσω


JoinBlock<T1,T2,T3> Class

Definition

Provides a dataflow block that joins across multiple dataflow sources, which are not necessarily of the same type, waiting for one item to arrive for each type before they're all released together as a tuple that contains one item per type.

generic <typename T1, typename T2, typename T3>
public ref class JoinBlock sealed : System::Threading::Tasks::Dataflow::IReceivableSourceBlock<Tuple<T1, T2, T3> ^>, System::Threading::Tasks::Dataflow::ISourceBlock<Tuple<T1, T2, T3> ^>
public sealed class JoinBlock<T1,T2,T3> : System.Threading.Tasks.Dataflow.IReceivableSourceBlock<Tuple<T1,T2,T3>>, System.Threading.Tasks.Dataflow.ISourceBlock<Tuple<T1,T2,T3>>
type JoinBlock<'T1, 'T2, 'T3> = class
    interface IReceivableSourceBlock<'T1 * 'T2 * 'T3>
    interface ISourceBlock<'T1 * 'T2 * 'T3>
    interface IDataflowBlock
type JoinBlock<'T1, 'T2, 'T3> = class
    interface IDataflowBlock
    interface IReceivableSourceBlock<'T1 * 'T2 * 'T3>
    interface ISourceBlock<'T1 * 'T2 * 'T3>
Public NotInheritable Class JoinBlock(Of T1, T2, T3)
Implements IReceivableSourceBlock(Of Tuple(Of T1, T2, T3)), ISourceBlock(Of Tuple(Of T1, T2, T3))

Type Parameters

T1

Specifies the type of data accepted by the block's first target.

T2

Specifies the type of data accepted by the block's second target.

T3

Specifies the type of data accepted by the block's third target.

Inheritance
JoinBlock<T1,T2,T3>
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.

Constructors

JoinBlock<T1,T2,T3>()

Initializes a new JoinBlock<T1,T2,T3>.

JoinBlock<T1,T2,T3>(GroupingDataflowBlockOptions)

Initializes a new JoinBlock<T1,T2,T3>.

Properties

Completion

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

OutputCount

Gets the number of output items available to be received from this block.

Target1

Gets a target that may be used to offer messages of the first type.

Target2

Gets a target that may be used to offer messages of the second type.

Target3

Gets a target that may be used to offer messages of the third type.

Methods

Complete()

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

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
LinkTo(ITargetBlock<Tuple<T1,T2,T3>>, DataflowLinkOptions)

Links the source block to the specified target block.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the formatted name of this IDataflowBlock instance.

TryReceive(Predicate<Tuple<T1,T2,T3>>, Tuple<T1,T2,T3>)

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

TryReceiveAll(IList<Tuple<T1,T2,T3>>)

Attempts to synchronously receive all available items from the IReceivableSourceBlock<TOutput>.

Explicit Interface Implementations

IDataflowBlock.Fault(Exception)

Causes the IDataflowBlock to complete in a Faulted state.

ISourceBlock<Tuple<T1,T2,T3>>.ConsumeMessage(DataflowMessageHeader, ITargetBlock<Tuple<T1,T2,T3>>, Boolean)

Passes the ownership of the message identified by the DataflowMessageHeader from this ISourceBlock<TOutput> instance to the ITargetBlock<TInput>.

ISourceBlock<Tuple<T1,T2,T3>>.ReleaseReservation(DataflowMessageHeader, ITargetBlock<Tuple<T1,T2,T3>>)

Releases the right to pass the ownership of the message identified by the DataflowMessageHeader from this ISourceBlock<TOutput> to the ITargetBlock<TInput>.

ISourceBlock<Tuple<T1,T2,T3>>.ReserveMessage(DataflowMessageHeader, ITargetBlock<Tuple<T1,T2,T3>>)

Reserves the right to pass the ownership of the message identified by the DataflowMessageHeader from this ISourceBlock<TOutput> to the ITargetBlock<TInput>.

Extension Methods

AsObservable<TOutput>(ISourceBlock<TOutput>)

Creates a new IObservable<T> abstraction over the ISourceBlock<TOutput>.

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, Predicate<TOutput>)

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

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>, DataflowLinkOptions, Predicate<TOutput>)

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

LinkTo<TOutput>(ISourceBlock<TOutput>, ITargetBlock<TOutput>)

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

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Provides a Task<TResult> that asynchronously monitors the source for available output.

OutputAvailableAsync<TOutput>(ISourceBlock<TOutput>)

Provides a Task<TResult> that asynchronously monitors the source for available output.

Receive<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Synchronously receives a value from a specified source and provides a token to cancel the operation.

Receive<TOutput>(ISourceBlock<TOutput>, TimeSpan, CancellationToken)

Synchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval.

Receive<TOutput>(ISourceBlock<TOutput>, TimeSpan)

Synchronously receives a value from a specified source, observing an optional time-out period.

Receive<TOutput>(ISourceBlock<TOutput>)

Synchronously receives a value from a specified source.

ReceiveAllAsync<TOutput>(IReceivableSourceBlock<TOutput>, CancellationToken)

Creates an IAsyncEnumerable<T> that enables receiving all of the data from the source.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, CancellationToken)

Asynchronously receives a value from a specified source and provides a token to cancel the operation.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, TimeSpan, CancellationToken)

Asynchronously receives a value from a specified source, providing a token to cancel the operation and observing an optional time-out interval.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>, TimeSpan)

Asynchronously receives a value from a specified source, observing an optional time-out period.

ReceiveAsync<TOutput>(ISourceBlock<TOutput>)

Asynchronously receives a value from a specified source.

TryReceive<TOutput>(IReceivableSourceBlock<TOutput>, TOutput)

Attempts to synchronously receive an item from the ISourceBlock<TOutput>.

Applies to