Table of Contents

Class VariableValidationEvent<TValue, TValidationResult>

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

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

public class VariableValidationEvent<TValue, TValidationResult> : IVariableValidationEvent<TValidationResult>, IVariableValidationEvent, IVariableNodeEvent

Type Parameters

TValue

Value type.

TValidationResult

Variable's validation result type.

Inheritance
VariableValidationEvent<TValue, TValidationResult>
Implements
IVariableValidationEvent<TValidationResult>
Inherited Members

Constructors

VariableValidationEvent(IReadOnlyVariable<TValue, TValidationResult>, Chain<TValidationResult>, Chain<TValidationResult>, VariableState, VariableValueChangeEvent<TValue, TValidationResult>?)

public VariableValidationEvent(IReadOnlyVariable<TValue, TValidationResult> variable, Chain<TValidationResult> previousErrors, Chain<TValidationResult> previousWarnings, VariableState previousState, VariableValueChangeEvent<TValue, TValidationResult>? associatedChange)

Parameters

variable IReadOnlyVariable<TValue, TValidationResult>

Variable node that emitted this event.

previousErrors Chain<TValidationResult>

Collection of validation errors before the change.

previousWarnings Chain<TValidationResult>

Collection of validation warnings before the change.

previousState VariableState

Previous state of the Variable.

associatedChange VariableValueChangeEvent<TValue, TValidationResult>

VariableValueChangeEvent<TValue, TValidationResult> instance associated with this validation event.

Properties

AssociatedChange

IVariableValueChangeEvent instance associated with this validation event.

public VariableValueChangeEvent<TValue, TValidationResult>? AssociatedChange { get; }

Property Value

VariableValueChangeEvent<TValue, TValidationResult>

NewErrors

Collection of validation errors after the change.

public Chain<TValidationResult> NewErrors { get; }

Property Value

Chain<TValidationResult>

NewState

Current state of the Variable.

public VariableState NewState { get; }

Property Value

VariableState

NewWarnings

Collection of validation warnings after the change.

public Chain<TValidationResult> NewWarnings { get; }

Property Value

Chain<TValidationResult>

PreviousErrors

Collection of validation errors before the change.

public Chain<TValidationResult> PreviousErrors { get; }

Property Value

Chain<TValidationResult>

PreviousState

Previous state of the Variable.

public VariableState PreviousState { get; }

Property Value

VariableState

PreviousWarnings

Collection of validation warnings before the change.

public Chain<TValidationResult> PreviousWarnings { get; }

Property Value

Chain<TValidationResult>

Variable

Variable node that emitted this event.

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

Property Value

IReadOnlyVariable<TValue, TValidationResult>