Method ChangeFor
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Collections.dll
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.
[Pure]
public static Maybe<Maybe<TState>> ChangeFor<TKey, TIdentity, TState>(this ItemChange<TKey, TIdentity, TState> change, TKey key) where TKey : notnull where TIdentity : notnull
Parameters
changeItemChange<TKey, TIdentity, TState>The change to read.
keyTKeyThe key to read.
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.