TrackableT Class |
The TrackableT type exposes the following members.
Name | Description | |
---|---|---|
TrackableT(String, Boolean) | Creates a new instance of the TrackableT class. | |
TrackableT(String, T, Boolean) | Creates a new instance of the TrackableT class. |
Name | Description | |
---|---|---|
ChangeList | Gets the list of changes to the property's value, starting from its original value and up to the current value. | |
CurrentValue | Gets or sets the current value after all changes have been applied to the property. | |
IsChanged | Gets a value to indicate whether the property's value has been changed since the last time the current value was committed. | |
OriginalValue | Gets the original value before the first change was made to the property. | |
PropertyName | Gets the name of the property being tracked. |
Name | Description | |
---|---|---|
AcceptChanges | Erases all history in the change list and commits the current value as the new original value. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
Reset | Erases all history in the change list and sets the original value back to its initial value. | |
Revert | Erases all history in the change list and reverts to the original value before the changes were made. | |
SetCurrentValue | Sets the current value of the property. | |
ToString |
Returns a string that represents the current value.
(Overrides ObjectToString) |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
This class is primarily designed to track changes to the property of an object, as in the following example.
public class MyClass { private Trackable<string> m_trackableText = new Trackable<string>(nameof(Text), true); public string Text { get { return m_trackableText.CurrentValue; } set { m_trackableText.CurrentValue = value; } } }