Table of Contents

Class VariableValueChangeEvent<TValue, TValidationResult>

Namespace
LfrlAnvil.Reactive.State.Events
Assembly
LfrlAnvil.Reactive.State.dll

Represents a generic value change event emitted by an IReadOnlyVariable<TValue, TValidationResult>.

public class VariableValueChangeEvent<TValue, TValidationResult> : IVariableValueChangeEvent<TValue>, IVariableValueChangeEvent, IVariableNodeEvent

Type Parameters

TValue

Variable's value type.

TValidationResult

Variable's validation result type.

Inheritance
VariableValueChangeEvent<TValue, TValidationResult>
Implements
Inherited Members

Constructors

VariableValueChangeEvent(IReadOnlyVariable<TValue, TValidationResult>, TValue, VariableState, VariableChangeSource)

public VariableValueChangeEvent(IReadOnlyVariable<TValue, TValidationResult> variable, TValue previousValue, VariableState previousState, VariableChangeSource source)

Parameters

variable IReadOnlyVariable<TValue, TValidationResult>

Variable node that emitted this event.

previousValue TValue

Value before the change.

previousState VariableState

Value after the change.

source VariableChangeSource

Specifies the source of this value change.

Properties

NewState

Current state of the Variable.

public VariableState NewState { get; }

Property Value

VariableState

NewValue

Value after the change.

public TValue NewValue { get; }

Property Value

TValue

PreviousState

Previous state of the Variable.

public VariableState PreviousState { get; }

Property Value

VariableState

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

VariableChangeSource

Variable

Variable node that emitted this event.

public IReadOnlyVariable<TValue, TValidationResult> Variable { get; }

Property Value

IReadOnlyVariable<TValue, TValidationResult>