Constructor BatchableSource
BatchableSource(IEnumerable<T>)
Initializes a new instance of the BatchableSource<T> class.
[Obsolete("Use one of the other constructors instead.")]
public BatchableSource(IEnumerable<T> batch)
Parameters
batch
IEnumerable<T>The single batch.
Remarks
Use this overload when you know the batch is small and won't have to be broken up into sub-batches. In that case using this overload is simpler than using an enumerator and using the other constructor.
BatchableSource(IEnumerator<T>)
Initializes a new instance of the BatchableSource<T> class.
[Obsolete("Use one of the other constructors instead.")]
public BatchableSource(IEnumerator<T> enumerator)
Parameters
enumerator
IEnumerator<T>The enumerator that will provide the items for the batch.
BatchableSource(IReadOnlyList<T>, bool)
Initializes a new instance of the BatchableSource<T> class.
public BatchableSource(IReadOnlyList<T> items, bool canBeSplit = false)
Parameters
items
IReadOnlyList<T>The items.
canBeSplit
boolif set to
true
the batch can be split.
BatchableSource(IReadOnlyList<T>, int, int, bool)
Initializes a new instance of the BatchableSource<T> class.
public BatchableSource(IReadOnlyList<T> items, int offset, int count, bool canBeSplit)
Parameters
items
IReadOnlyList<T>The items.
offset
intThe offset.
count
intThe count.
canBeSplit
boolif set to
true
the batch can be split.