Class BatchUtility
Utility class for working with batches of items.
Assembly: Benday.CosmosDb.dll
Syntax
public static class BatchUtility
Methods
|
Edit this page
View Source
CreateArrayForBatch<T>(List<T>, int, int)
Creates an array of items for a specific batch number.
Declaration
public static T[] CreateArrayForBatch<T>(List<T> results, int batchSize, int batchNumber)
Parameters
| Type |
Name |
Description |
| List<T> |
results |
|
| int |
batchSize |
|
| int |
batchNumber |
|
Returns
Type Parameters
Exceptions
|
Edit this page
View Source
GetBatchCount(int, int)
Gets the number of batches that will be created.
Declaration
public static int GetBatchCount(int itemCount, int batchSize)
Parameters
| Type |
Name |
Description |
| int |
itemCount |
|
| int |
batchSize |
|
Returns
|
Edit this page
View Source
GetBatches<T>(IEnumerable<T>, int)
Gets a list of arrays of items that are batched.
Declaration
public static List<T[]> GetBatches<T>(IEnumerable<T> values, int batchSize)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
values |
Values to convert to batches
|
| int |
batchSize |
Number of items per batch
|
Returns
| Type |
Description |
| List<T[]> |
|
Type Parameters