跳到主要内容

Class Value

Represents a wrapper around type T. It has the following features:

  1. It is serializable.

  2. It can have a default value.

  3. It sends a notification when the value changes.

Events

onValueChanged

public event Action onValueChanged;

Properties

defaultValue

public T defaultValue { get; private set; }

value

public T value { get; set; }

Constructors

Value(T defaultValue)

public Value(T defaultValue)

Methods

Reset()

public void Reset()

ResetWithoutNotify()

public void ResetWithoutNotify()

SetValueWithoutNotify(T newValue)

public void SetValueWithoutNotify(T newValue)

ToString()

public override string ToString()

Equals(object obj)

public override bool Equals(object obj)

Equals(Value<T> other)

public bool Equals(Value<T> other)

GetHashCode()

public override int GetHashCode()