Table of Contents

Method IdentityCell

Namespace
SodaFlow.Collections
Assembly
SodaFlow.Collections.dll

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.

public static Cell<Maybe<TIdentity>> IdentityCell<TKey, TIdentity, TState>(this ReactiveCollection<TKey, TIdentity, TState> collection, TKey key) where TKey : notnull where TIdentity : notnull

Parameters

collection ReactiveCollection<TKey, TIdentity, TState>

The collection or view to monitor.

key TKey

The key to monitor.

Returns

Cell<Maybe<TIdentity>>

A cell tracking that key's identity.

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.

Remarks

Fires only on structural change, so it is near-free to hold.