Class Change<T>
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Container to describe a single change to a cache.
Type Parameters
T
The type of the item.
- Inheritance
-
Change<T>
- Implements
-
IEquatable<Change<T>>
- Extension Methods
Constructors
Change(ListChangeReason, IEnumerable<T>, int)
Initializes a new instance of the Change<T> class.
Parameters
reason
ListChange Reason The reason.
items
IEnumerable<T>The items.
index
intThe index.
Change(ListChangeReason, T, in Optional<T>, int, int)
Initializes a new instance of the Change<T> class. Initializes a new instance of the Change<TObject, TKey> struct.
public Change(ListChangeReason reason, T current, in Optional<T> previous, int currentIndex = -1, int previousIndex = -1)
Parameters
reason
ListChange Reason The reason.
current
TThe current.
previous
Optional<T>The previous.
currentIndex
intValue of the current.
previousIndex
intValue of the previous.
Exceptions
- Argument
Exception For ChangeReason.Add, a previous value cannot be specified or For ChangeReason.Change, must supply previous value.
Change(ListChangeReason, T, int)
Initializes a new instance of the Change<T> class.
Parameters
reason
ListChange Reason The reason.
current
TThe current.
index
intThe index.
Change(T, int, int)
Initializes a new instance of the Change<T> class. Constructor for ChangeReason.Move.
Parameters
current
TThe current.
currentIndex
intThe CurrentIndex.
previousIndex
intCurrentIndex of the previous.
Exceptions
- Argument
Exception CurrentIndex must be greater than or equal to zero or PreviousIndex must be greater than or equal to zero.
Properties
Item
Gets a single item change.
Property Value
- Item
Change <T>
Range
Gets a multiple item change.
Property Value
- Range
Change <T>
Reason
Gets the reason for the change.
Property Value
Type
Gets a value indicating whether the change is a single item change or a range change.
Property Value
- Change
Type The type.
Methods
Equals(Change<T>?)
Parameters
other
Change<T>
Returns
Equals(object?)
Parameters
obj
object