Class ValueSnapshot<T>
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Represents a snapshot of a value, capturing its current and previous states.
[Version(4, 1, 0)]
public class ValueSnapshot<T>
Type Parameters
T
The type of the value being tracked.
- Inheritance
-
ValueSnapshot<T>
- Derived
- Inherited Members
- Extension Methods
Remarks
This type is mostly useful as a base for other types. See for example ObservedValue<T>.
Constructors
- ValueSnapshot()
Initializes a new instance of the ValueSnapshot<T> class.
- ValueSnapshot(T)
Initializes a new instance of the ValueSnapshot<T> class with an initial value.
Properties
- HasPreviousValue
Gets a value indicating whether the Value has been set more than once, and thus has a PreviousValue.
- PreviousValue
Gets the previous value assigned to this snapshot.
- Value
Gets or sets the current value of this snapshot.
Methods
- Reset()
Resets the value of this snapshot to its initial state.
- Reset(T)
Resets the value of this snapshot with an initial value.