GroupingDataflowBlockOptions Class
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>.
System.Threading.Tasks.Dataflow::DataflowBlockOptions
System.Threading.Tasks.Dataflow::GroupingDataflowBlockOptions
Namespace: System.Threading.Tasks.Dataflow
Assembly: System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)
The GroupingDataflowBlockOptions type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | BoundedCapacity | Gets or sets the maximum number of messages that may be buffered by the block. (Inherited from DataflowBlockOptions.) |
![]() ![]() | CancellationToken | Gets or sets the CancellationToken to monitor for cancellation requests. (Inherited from DataflowBlockOptions.) |
![]() ![]() | Greedy | Gets or sets the Boolean value to use to determine whether to greedily consume offered messages. |
![]() ![]() | MaxMessagesPerTask | Gets or sets the maximum number of messages that may be processed per task. (Inherited from DataflowBlockOptions.) |
![]() ![]() | MaxNumberOfGroups | Gets or sets the maximum number of groups that should be generated by the block. |
![]() ![]() | NameFormat | Gets or sets the format string to use when a block is queried for its name. (Inherited from DataflowBlockOptions.) |
![]() ![]() | TaskScheduler | Gets or sets the TaskScheduler to use for scheduling tasks. (Inherited from DataflowBlockOptions.) |
| Name | Description | |
|---|---|---|
![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
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 | |
CancellationToken | |
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.




Note