BatchBlock<T> Constructors

Definition

Overloads

BatchBlock<T>(Int32)

Initializes a new BatchBlock<T> with the specified batch size.

BatchBlock<T>(Int32, GroupingDataflowBlockOptions)

Initializes a new BatchBlock<T> with the specified batch size, declining option, and block options.

BatchBlock<T>(Int32)

Initializes a new BatchBlock<T> with the specified batch size.

public BatchBlock (int batchSize);
Parameters
batchSize
Int32

The number of items to group into a batch.

Exceptions

The batchSize must be positive.

BatchBlock<T>(Int32, GroupingDataflowBlockOptions)

Initializes a new BatchBlock<T> with the specified batch size, declining option, and block options.

public BatchBlock (int batchSize, System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions);
Parameters
batchSize
Int32

The number of items to group into a batch.

dataflowBlockOptions
GroupingDataflowBlockOptions

The options with which to configure this BatchBlock<T>.

Exceptions

The batchSize must be positive.

-or-

The batchSize must be smaller than the value of the BoundedCapacity option if a non-default value has been set.

The dataflowBlockOptions is null.