Interface ICanTrackProperties
Indicates this item can track the original values of certain properties before any changes are made
Namespace: LemonEdge.Utils
Assembly: LemonEdge.Utils.dll
Syntax
public interface ICanTrackProperties
Methods
ClearTrackedOriginalValues()
Clears the values of all tracked properties back to their original values
Declaration
void ClearTrackedOriginalValues()
GetAllOriginalTrackedPropertyValues()
Returns a dictionary of all the original values currently being tracked by this item. An entry for a property means the property has been changed. No entry means it still has its original value and has not been changed yet.
Declaration
IReadOnlyDictionary<string, object> GetAllOriginalTrackedPropertyValues()
Returns
Type | Description |
---|---|
IReadOnlyDictionary<string, object> | A dictionary of all the original values currently being tracked by this item |
HasTrackedPropertyChanged(string)
Indicates if the specified property (propName
) has had its value changed
Declaration
bool HasTrackedPropertyChanged(string propName)
Parameters
Type | Name | Description |
---|---|---|
string | propName | The name of the property to check if its value has been changed |
Returns
Type | Description |
---|---|
bool | True if the specified property has had its value changed |
OriginalTrackedPropertyValue(string)
Returns the original value of the specified property before it was changed.
Declaration
object OriginalTrackedPropertyValue(string propName)
Parameters
Type | Name | Description |
---|---|---|
string | propName | The name of the property to return the original value for |
Returns
Type | Description |
---|---|
object | The original value for the specified property before it was changed |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Throws an error if this property still has its original value and has not been changed |
OriginalTrackedPropertyValue<T>(string)
Returns the original value of the specified property before it was changed.
Declaration
T OriginalTrackedPropertyValue<T>(string propName)
Parameters
Type | Name | Description |
---|---|---|
string | propName | The name of the property to return the original value for |
Returns
Type | Description |
---|---|
T | The original value for the specified property before it was changed |
Type Parameters
Name | Description |
---|---|
T | The type of the specified property |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Throws an error if this property still has its original value and has not been changed |