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