Table of Contents

Class OrderedKeys<TKey, TIdentity, TState>

Namespace
SodaFlow.Collections
Assembly
SodaFlow.Core.Collections.dll

An immutable ordered set of keys. Each stage of a view chain holds one of these sets.

[PublicAPI]
public abstract class OrderedKeys<TKey, TIdentity, TState> : IReadOnlyList<TKey>, IReadOnlyCollection<TKey>, IEnumerable<TKey>, IEnumerable where TKey : notnull where TIdentity : notnull

Type Parameters

TKey

The type of the keys.

TIdentity

The type of the immutable part of an item.

TState

The type of the mutable part of an item.

Inheritance
OrderedKeys<TKey, TIdentity, TState>
Implements
Inherited Members
Extension Methods

Remarks

The sort key type is not in this interface. It stays a generic parameter of the implementation, thus this code keeps and compares each sort value as its own type and boxes none of them. The chain composes at this interface, and the type of the interface does not become larger at each stage.

Properties

Count

Gets the number of elements in the collection.

this[int]

Gets the element at the specified index in the read-only list.

Methods

Contains(TKey)

True when a key is in this set.

GetEnumerator()

Returns an enumerator that iterates through the collection.