Table of Contents

Class CollectionExtensionMethods

Namespace
SodaFlow.Collections
Assembly
SodaFlow.Collections.dll

The part of the C# surface with optional values: the cells for one item, and the lookups that answer with a Maybe<T> and not with a TryGet.

[PublicAPI]
public static class CollectionExtensionMethods
Inheritance
CollectionExtensionMethods
Inherited Members

Remarks

These are here and not in SodaFlow.Collections.Core, because Maybe<T> is in SodaFlow.Functional and F# does not use that assembly. F# has option. Thus, the core answers with a TryGet and with an integer, and each language surface adds its own optional type above the core. See ReactiveCollection<TKey, TIdentity, TState>.

Methods

ChangeFor<TKey, TIdentity, TState>(ItemChange<TKey, TIdentity, TState>, TKey)

The result of a change on one key. The two levels are deliberate and they give different data. The outer Maybe<T> gives if the change named the key, and no value means no event for this observer. The inner Maybe<T> gives if the collection has the key after the change, thus a removal comes as a value that holds no value.

IdentityCell<TKey, TIdentity, TState>(ReactiveCollection<TKey, TIdentity, TState>, TKey)

A cell that follows the immutable part of one item. It has no value while the key is missing.

IndexOf<TKey, TIdentity, TState>(OrderedKeys<TKey, TIdentity, TState>, TKey)

The position of a key in an ordered set, when the set has that key.

ItemCell<TKey, TIdentity, TState>(ReactiveCollection<TKey, TIdentity, TState>, TKey)

A cell that follows the two parts of one item together. It has no value while the store does not have the key.

Lookup<TKey, TState>(StateMap<TKey, TState>, TKey)

Returns the state for a key, when there is one.

Lookup<TKey, TIdentity, TState>(CollectionSnapshot<TKey, TIdentity, TState>, TKey)

Returns the two parts of the item for a key, when there is one.

StateCell<TKey, TIdentity, TState>(ReactiveCollection<TKey, TIdentity, TState>, TKey)

A cell that follows the mutable part of one item. It has no value while the store does not have the key.