GroupingDataflowBlockOptions Class

Definition

Provides options used to configure the processing performed by dataflow blocks that group together multiple messages. These are dataflow blocks such as JoinBlock<T1,T2> and BatchBlock<T>.

public class GroupingDataflowBlockOptions : System.Threading.Tasks.Dataflow.DataflowBlockOptions
Inheritance
GroupingDataflowBlockOptions

Inherited Members

System.Object

System.Threading.Tasks.Dataflow.DataflowBlockOptions

Remarks

Note

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.

GroupingDataflowBlockOptions is mutable and can be configured through its properties.

When specific configuration options are not set, the following defaults are used:

Options Default
TaskScheduler Default
CancellationToken None
MaxMessagesPerTask DataflowBlockOptions.Unbounded (-1)
BoundedCapacity DataflowBlockOptions.Unbounded (-1)
MaxNumberOfGroups GroupingDataflowBlockOptions.Unbounded (-1)
Greedy true

Dataflow block capture the state of the options at their construction. Subsequent changes to the provided GroupingDataflowBlockOptions instance should not affect the behavior of a dataflow block.

Constructors

GroupingDataflowBlockOptions()

Initializes a new GroupingDataflowBlockOptions.

Properties

Greedy

Gets or sets the Boolean value to use to determine whether to greedily consume offered messages.

MaxNumberOfGroups

Gets or sets the maximum number of groups that should be generated by the block.