Struct ItemChange<T>
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Container to describe a single change to a cache.
Type Parameters
T
The type of the item.
- Implements
-
IEquatable<Item
Change <T>>
Constructors
ItemChange(ListChangeReason, T, in Optional<T>, int, int)
Initializes a new instance of the ItemChange<T> struct.
public ItemChange(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.
ItemChange(ListChangeReason, T, int)
Initializes a new instance of the ItemChange<T> struct.
Parameters
reason
ListChange Reason The reason.
current
TThe current.
currentIndex
intIndex of the current.
Fields
Empty
An empty change.
Field Value
- Item
Change <T>
Properties
Current
Gets the item which has changed.
Property Value
- T
CurrentIndex
Gets the current index.
Property Value
Previous
Gets the previous change.
This is only when Reason==ChangeReason.Replace.
Property Value
- Optional<T>
PreviousIndex
Gets the previous index.
This is only when Reason==ChangeReason.Replace or ChangeReason.Move.
Property Value
Reason
Gets the reason for the change.
Property Value
Methods
Equals(ItemChange<T>)
Determines whether the specified object, is equal to this instance.
Parameters
other
ItemChange <T>The other.
Returns
- bool
If the value is equal.
Equals(object?)
Determines whether the specified object, is equal to this instance.
Parameters
Returns
GetHashCode()
Returns a hash code for this instance.
Returns
- int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
ToString()
Returns a string that represents this instance.
Returns
Operators
operator ==(in ItemChange<T>, in ItemChange<T>)
Determines whether the specified objects are equal.
Parameters
left
ItemChange <T>The left hand side to compare.
right
ItemChange <T>The right hand side to compare.
Returns
- bool
If the two values are equal.
operator !=(in ItemChange<T>, in ItemChange<T>)
Determines whether the specified objects are not equal.
Parameters
left
ItemChange <T>The left hand side to compare.
right
ItemChange <T>The right hand side to compare.
Returns
- bool
If the two values are not equal.