BatchBlock<T> 构造函数

定义

重载

BatchBlock<T>(Int32)

初始化指定批次大小的新 BatchBlock<T>

BatchBlock<T>(Int32, GroupingDataflowBlockOptions)

用指定的批大小、定义选项和块选项初始化新的 BatchBlock<T>

BatchBlock<T>(Int32)

初始化指定批次大小的新 BatchBlock<T>

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)

参数

batchSize
Int32

分组为批的项数。

例外

batchSize 必须是正数。

适用于

BatchBlock<T>(Int32, GroupingDataflowBlockOptions)

用指定的批大小、定义选项和块选项初始化新的 BatchBlock<T>

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)

参数

batchSize
Int32

分组为批的项数。

dataflowBlockOptions
GroupingDataflowBlockOptions

用来配置此 BatchBlock<T>的选项。

例外

batchSize 必须是正数。

  • 或 - 如果已设置非默认值,则 batchSize 必定小于 BoundedCapacity 选项的值。

dataflowBlockOptionsnull

适用于