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
TTChunk
- 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
addedChunksList<TChunk>A reference to a collection with added chunks
removedChunksList<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
itemTThe item that should be added
startingIndexintThe starting index
Returns
- bool
True, if the item could be added to an existing chunk, otherwise False