Class Item<TIdentity, TState>
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Core.Collections.dll
An item in the collection, in two parts: the immutable part ( Identity) and the mutable part (State).
[PublicAPI]
public sealed class Item<TIdentity, TState> where TIdentity : notnull
Type Parameters
TIdentityThe type of the immutable part.
TStateThe type of the mutable part.
- Inheritance
-
Item<TIdentity, TState>
- Inherited Members
- Extension Methods
Remarks
The key comes from Identity only. No code in the update path
can read Identity, because an update holds only a
Func<TState, TState>. Thus, the structure keeps each key
constant, and no test at run time is necessary. A change to an identity is
a removal and then an add, which is a structural edit.
Constructors
- Item(TIdentity, TState)
Creates an item from its two halves.
Properties
- Identity
The immutable part, which gives the key.
- State
The mutable part.