Table of Contents

Class ObservedValue<T>

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Wrapper that can raise an event when a value changes.

public sealed class ObservedValue<T> : ValueSnapshot<T>

Type Parameters

T

The type of value to track.

Inheritance
ObservedValue<T>
Inherited Members
Extension Methods

Constructors

ObservedValue(IEqualityComparer<T>)

Initializes a new instance of the ObservedValue<T> class.

ObservedValue(T, IEqualityComparer<T>)

Initializes a new instance of the ObservedValue<T> class.

Properties

TrackingEnabled

Gets or sets a value indicating whether tracking is enabled for this ObservedValue<T>.

Value

Gets or sets and sets the value of this ObservedValue<T>, and fire the OnValueChange event if the event has changed from its last value if TrackingEnabled is true.

Methods

SetSilently(T)

Sets the value without notification.

ToString()

Events

OnValueChange

Raised when Value has changed from its previous value and TrackingEnabled is true.