JoinBlock<T1,T2>
Class
Definition
Provides a dataflow block that joins across multiple dataflow sources, not necessarily of the same type, waiting for one item to arrive for each type before they’re all released together as a tuple consisting of one item per type.
public sealed class JoinBlock<T1,T2> : System.Threading.Tasks.Dataflow.IReceivableSourceBlock<Tuple<T1,T2>>, System.Threading.Tasks.Dataflow.ISourceBlock<Tuple<T1,T2>>
- 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.
- Inheritance
-
JoinBlock<T1,T2>
- Implements
-
IReceivableSourceBlock<Tuple<T1,T2>> ISourceBlock<Tuple<T1,T2>>
Inherited Members
System.Object
Remarks
Note
The TPL Dataflow Library (System.Threading.Tasks.Dataflow namespace) is not distributed with the .NET Framework 4.5. To install the N: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.
Constructors
| JoinBlock<T1,T2>() |
Initializes a new JoinBlock<T1,T2>. |
| JoinBlock<T1,T2>(GroupingDataflowBlockOptions) |
Initializes a new JoinBlock<T1,T2>. |
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. |
Methods
| Complete() |
Signals to the IDataflowBlock that it should not accept nor produce any more messages nor consume any more postponed messages. |
| LinkTo(ITargetBlock<Tuple<T1,T2>>, DataflowLinkOptions) |
Links the ISourceBlock<TOutput> to the specified ITargetBlock<TInput> . |
| ToString() |
Returns a string that represents the formatted name of this IDataflowBlock instance. |
| TryReceive(Predicate<Tuple<T1,T2>>, Tuple<T1,T2>) |
Attempts to synchronously receive an available output item from the IReceivableSourceBlock<TOutput>. |
| TryReceiveAll(IList<Tuple<T1,T2>>) |
Attempts to synchronously receive all available items from the IReceivableSourceBlock<TOutput>. |