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
batchIEnumerable<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
enumeratorIEnumerator<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
itemsIReadOnlyList<T>The items.
canBeSplitboolif set to
truethe 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
itemsIReadOnlyList<T>The items.
offsetintThe offset.
countintThe count.
canBeSplitboolif set to
truethe batch can be split.