Edit

Bagikan melalui


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)

Source:
BatchBlock.cs
Source:
BatchBlock.cs
Source:
BatchBlock.cs

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

public:
 BatchBlock(int batchSize);
public BatchBlock (int batchSize);
new System.Threading.Tasks.Dataflow.BatchBlock<'T> : int -> System.Threading.Tasks.Dataflow.BatchBlock<'T>
Public Sub New (batchSize As Integer)

Parameters

batchSize
Int32

The number of items to group into a batch.

Exceptions

The batchSize must be positive.

Applies to

BatchBlock<T>(Int32, GroupingDataflowBlockOptions)

Source:
BatchBlock.cs
Source:
BatchBlock.cs
Source:
BatchBlock.cs

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);
public BatchBlock (int batchSize, System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions);
new System.Threading.Tasks.Dataflow.BatchBlock<'T> : int * System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions -> System.Threading.Tasks.Dataflow.BatchBlock<'T>
Public Sub New (batchSize As Integer, dataflowBlockOptions As GroupingDataflowBlockOptions)

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.

Applies to