Class CollectionViewChange<TKey, TIdentity, TState>
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Core.Collections.dll
The result of one stage of a view chain in a transaction. It is the public change notification and it is also the protocol between two stages.
[PublicAPI]
public sealed class CollectionViewChange<TKey, TIdentity, TState> where TKey : notnull where TIdentity : notnull
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.
- Inheritance
-
CollectionViewChange<TKey, TIdentity, TState>
- Inherited Members
- Extension Methods
Remarks
The event holds its result Keys and the store on the two sides of the change, which are Before and After. The next stage does not sample them. A stage below runs in the same transaction, and a sample of a cell there gives the value from before the transaction. Thus, the event must hold the results, or the chain does not agree with itself. That also lets a consumer make a delta with no copy of the previous values.
The index of an operation is correct for a consumer that applies the operations in sequence to the previous key list.
Properties
- After
The store as this transaction left it.
- Before
The store as this transaction found it.
- IsReset
The stage built its keys again and did not change them incrementally. Operations is empty. Read all of Keys.
- Keys
This stage's keys after the change.
- Operations
The operations to apply, in order, to the previous key list.