Show / Hide Table of Contents

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>
Namespace: Eco.Core.Utils
Assembly: Eco.Core.dll
Syntax
public sealed class Dirtyable<T> : ValueType
Type Parameters
Name Description
T

Constructors

Dirtyable(T)

Declaration
public Dirtyable(T value)
Parameters
Type Name Description
T value

Fields

Dirty

Declaration
public bool Dirty
Field Value
Type Description
System.Boolean

Properties

Value

Declaration
public T Value { get; set; }
Property Value
Type Description
T

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
Type Description
Dirtyable<T>

Implicit(Dirtyable<T> to T)

Declaration
public static implicit operator T(Dirtyable<T> dirtyable)
Parameters
Type Name Description
Dirtyable<T> dirtyable
Returns
Type Description
T

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾