Class ViewMove<TKey>
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Core.Collections.dll
The key stayed and its position changed. It is equivalent to a removal at FromIndex and then an add at ToIndex. This code reports one operation, thus a bound list can move the row and keep its selection.
[PublicAPI]
public sealed class ViewMove<TKey> : ViewOperation<TKey> where TKey : notnull
Type Parameters
TKeyThe type of the keys.
- Inheritance
-
ViewOperation<TKey>ViewMove<TKey>
- Inherited Members
- Extension Methods
Remarks
A move comes only from a change to the value of the key, in an order that reads that value. The move is the sort, and no ViewUpdate<TKey> comes with it. A consumer that makes a delta must read this as an update that also moved the key, and a stage below must sort on it.
A change of order is never a set of moves, at each count of the keys that move. It is always a reset, with IsReset set. The stages use that rule. A filter keeps the order of its upstream collection and sorts a key that moved in the order that it holds. Thus, a move from a new order leaves the filter in the previous order. Each stage below also reads a move as a change of value: a stage sorts the key again, and a cell for one item sends a value. For a change of order alone, that is work with no result.
Properties
- FromIndex
The position the key moved from.
- ToIndex
The position the key moved to.