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
collectionReactiveCollection<TKey, TIdentity, TState>The collection or view to monitor.
keyTKeyThe key to monitor.
Returns
Type Parameters
TKeyThe type of the keys.
TIdentityThe type of the immutable part of an item.
TStateThe type of the mutable part of an item.
Remarks
Fires only on structural change, so it is near-free to hold.