Interface IBatchableSource<T>
Represents a batch of items that can be split if not all items can be processed at once.
public interface IBatchableSource<out T>
Type Parameters
T
The type of the items.
Properties
AllItemsWereProcessed
Gets a value indicating whether all items were processed.
bool AllItemsWereProcessed { get; }
Property Value
- bool
true
if all items were processed; otherwise,false
.
CanBeSplit
Gets a value indicating whether the batch can be split.
bool CanBeSplit { get; }
Property Value
- bool
true
if the batch can be split; otherwise,false
.
Count
Gets the count.
int Count { get; }
Property Value
- int
The count.
Items
Gets the items.
IReadOnlyList<out T> Items { get; }
Property Value
- IReadOnlyList<T>
The items.
Offset
Gets the offset.
int Offset { get; }
Property Value
- int
The offset.
ProcessedCount
Gets the count of processed items. Equal to zero until SetProcessedCount has been called.
int ProcessedCount { get; }
Property Value
- int
The count of processed items.
Methods
AdvancePastProcessedItems()
Advances past the processed items.
void AdvancePastProcessedItems()
GetBatchItems()
Gets the items in the batch.
IReadOnlyList<out T> GetBatchItems()
Returns
- IReadOnlyList<T>
The items in the batch.
GetProcessedItems()
Gets the items that were processed.
IReadOnlyList<out T> GetProcessedItems()
Returns
- IReadOnlyList<T>
The items that were processed.
GetUnprocessedItems()
Gets the items that were not processed.
IReadOnlyList<out T> GetUnprocessedItems()
Returns
- IReadOnlyList<T>
The items that were not processed.
SetProcessedCount(int)
Sets the processed count.
void SetProcessedCount(int value)
Parameters
value
intThe value.