Class VariableValueChangeEvent<TValue, TValidationResult>
Represents a generic value change event emitted by an IReadOnlyVariable<TValue, TValidationResult>.
public class VariableValueChangeEvent<TValue, TValidationResult> : IVariableValueChangeEvent<TValue>, IVariableValueChangeEvent, IVariableNodeEvent
Type Parameters
TValueVariable's value type.
TValidationResultVariable's validation result type.
- Inheritance
-
VariableValueChangeEvent<TValue, TValidationResult>
- Implements
-
IVariableValueChangeEvent<TValue>
- Inherited Members
Constructors
VariableValueChangeEvent(IReadOnlyVariable<TValue, TValidationResult>, TValue, VariableState, VariableChangeSource)
Creates a new VariableValueChangeEvent<TValue, TValidationResult> instance.
public VariableValueChangeEvent(IReadOnlyVariable<TValue, TValidationResult> variable, TValue previousValue, VariableState previousState, VariableChangeSource source)
Parameters
variableIReadOnlyVariable<TValue, TValidationResult>Variable node that emitted this event.
previousValueTValueValue before the change.
previousStateVariableStateValue after the change.
sourceVariableChangeSourceSpecifies the source of this value change.
Properties
NewState
Current state of the Variable.
public VariableState NewState { get; }
Property Value
NewValue
Value after the change.
public TValue NewValue { get; }
Property Value
- TValue
PreviousState
Previous state of the Variable.
public VariableState PreviousState { get; }
Property Value
PreviousValue
Value before the change.
public TValue PreviousValue { get; }
Property Value
- TValue
Source
Specifies the source of this value change.
public VariableChangeSource Source { get; }
Property Value
Variable
Variable node that emitted this event.
public IReadOnlyVariable<TValue, TValidationResult> Variable { get; }
Property Value
- IReadOnlyVariable<TValue, TValidationResult>