Class Change<T>
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Container to describe a single change to a cache.
Type Parameters
TThe type of the item.
- Inheritance
-
Change<T>
- Implements
-
IEquatable<Change<T>>
Constructors
Change(ListChangeReason, IEnumerable<T>, int)
Initializes a new instance of the Change<T> class.
Parameters
reasonListChange Reason The reason.
itemsIEnumerable<T>The items.
indexintThe 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
reasonListChange Reason The reason.
currentTThe current.
previousOptional<T>The previous.
currentIndexintValue of the current.
previousIndexintValue 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
reasonListChange Reason The reason.
currentTThe current.
indexintThe index.
Change(T, int, int)
Initializes a new instance of the Change<T> class. Constructor for ChangeReason.Move.
Parameters
currentTThe current.
currentIndexintThe CurrentIndex.
previousIndexintCurrentIndex 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
otherChange<T>
Returns
Equals(object?)
Parameters
objobject