Class Dirtyable<T>
Helps to track value dirty state. When Value assigned and if it not equals to previous value then Dirty flag sets.
Inheritance
System.Object
Dirtyable<T>
Assembly: Eco.Core.dll
Syntax
public sealed class Dirtyable<T> : ValueType
Type Parameters
Constructors
Dirtyable(T)
Declaration
public Dirtyable(T value)
Parameters
| Type |
Name |
Description |
| T |
value |
|
Fields
Dirty
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
Properties
Value
Declaration
public T Value { get; set; }
Property Value
Methods
TryGetDirtyValueAndClear(out T)
Tries to get dirty value (if value is Dirty) and then clears Dirty flag. Returns false if value wasn't dirty. Outputs current value in currentValue no matter of return value.
Declaration
public bool TryGetDirtyValueAndClear(out T currentValue)
Parameters
| Type |
Name |
Description |
| T |
currentValue |
|
Returns
| Type |
Description |
| System.Boolean |
|
Operators
Implicit(T to Dirtyable<T>)
Declaration
public static implicit operator Dirtyable<T>(T value)
Parameters
| Type |
Name |
Description |
| T |
value |
|
Returns
Implicit(Dirtyable<T> to T)
Declaration
public static implicit operator T(Dirtyable<T> dirtyable)
Parameters
Returns
Extension Methods