Interface IChunkBalancingStrategy<T, TChunk>
Denotes a balancing strategy when items are added or deleted dynamically
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Chunk.dll
Syntax
public interface IChunkBalancingStrategy<T, TChunk>
Type Parameters
Name | Description |
---|---|
T | |
TChunk |
Methods
| Edit this page View SourceBalance(ref List<TChunk>, ref List<TChunk>)
Balances the chunk collection after items have been removed
Declaration
void Balance(ref List<TChunk> addedChunks, ref List<TChunk> removedChunks)
Parameters
Type | Name | Description |
---|---|---|
List<TChunk> | addedChunks | A reference to a collection with added chunks |
List<TChunk> | removedChunks | A reference to a collection with removed chunks |
TryAddToExistingChunk(T, int)
Tries to add the given item to an existing chunk
Declaration
bool TryAddToExistingChunk(T item, int startingIndex)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item that should be added |
int | startingIndex | The starting index |
Returns
Type | Description |
---|---|
bool | True, if the item could be added to an existing chunk, otherwise False |