Table of Contents

Interface IObservableChunk<T, TChunk>

Namespace
NMF.Expressions.Linq
Assembly
NMF.Expressions.Chunk.dll

Denotes an abstract observable chunk collection

public interface IObservableChunk<T, TChunk>

Type Parameters

T

The type of items

TChunk

The type of chunks

Extension Methods

Properties

ChunkCount

Gets the amount of chunks

int ChunkCount { get; }

Property Value

int

ChunkSize

Gets the size of the chunks

int ChunkSize { get; }

Property Value

int

Chunks

Gets the collection of chunks

IReadOnlyList<TChunk> Chunks { get; }

Property Value

IReadOnlyList<TChunk>

ElementCount

The the total number of elements

int ElementCount { get; }

Property Value

int

Methods

AddToChunk(int, T)

Adds the given element to the chunk with the provided index

void AddToChunk(int chunkIndex, T item)

Parameters

chunkIndex int

The index of the chunk

item T

The item that should be added

CreateChunkForItem(T)

Creates a chunk for the given item

TChunk CreateChunkForItem(T item)

Parameters

item T

The item that should start a new chunk

Returns

TChunk

The created chunk

GetAccumulatedElementCount(int)

Gets the cumulative number of elements up the given chunk index

int GetAccumulatedElementCount(int chunkIndex)

Parameters

chunkIndex int

The index of the chunk

Returns

int

The number of all elements up to and including the provided chunk

GetChunkItemAt(int, int)

Gets the item at the provided position

T GetChunkItemAt(int chunkIndex, int chunkPosition)

Parameters

chunkIndex int

The index of the chunk

chunkPosition int

The position within the chunk

Returns

T

The item

GetChunkSize(int)

Gets the current size of the chunk with the given index

int GetChunkSize(int chunkIndex)

Parameters

chunkIndex int

The index of the chunk

Returns

int

The number of elements in the chunk

RemoveChunk(int, ref List<TChunk>)

Removes the provided chunk completely

void RemoveChunk(int chunkIndex, ref List<TChunk> removeList)

Parameters

chunkIndex int

The index of the chunk

removeList List<TChunk>

A reference to a list used for notifications

RemoveFromChunk(int, int)

Removes the element with the given position from the chunk

void RemoveFromChunk(int chunkIndex, int chunkPosition)

Parameters

chunkIndex int

The index of the chunk

chunkPosition int

The index within the chunk