Table of Contents

Class CollectionVariableValidationEvent<TKey, TElement, TValidationResult>

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

Represents a generic validation event emitted by an IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>.

public class CollectionVariableValidationEvent<TKey, TElement, TValidationResult> : ICollectionVariableValidationEvent<TValidationResult>, ICollectionVariableValidationEvent, IVariableNodeEvent where TKey : notnull where TElement : notnull

Type Parameters

TKey

Key type.

TElement

Element type.

TValidationResult

Variable's validation result type.

Inheritance
CollectionVariableValidationEvent<TKey, TElement, TValidationResult>
Implements
Inherited Members

Constructors

CollectionVariableValidationEvent(IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>, Chain<TValidationResult>, Chain<TValidationResult>, VariableState, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>, CollectionVariableChangeEvent<TKey, TElement, TValidationResult>?)

public CollectionVariableValidationEvent(IReadOnlyCollectionVariable<TKey, TElement, TValidationResult> variable, Chain<TValidationResult> previousErrors, Chain<TValidationResult> previousWarnings, VariableState previousState, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>> elements, CollectionVariableChangeEvent<TKey, TElement, TValidationResult>? associatedChange)

Parameters

variable IReadOnlyCollectionVariable<TKey, TElement, 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.

elements IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

Collection of elements associated with this event.

associatedChange CollectionVariableChangeEvent<TKey, TElement, TValidationResult>

ICollectionVariableChangeEvent instance associated with this validation event.

Properties

AssociatedChange

ICollectionVariableChangeEvent instance associated with this validation event.

public CollectionVariableChangeEvent<TKey, TElement, TValidationResult>? AssociatedChange { get; }

Property Value

CollectionVariableChangeEvent<TKey, TElement, TValidationResult>

Elements

Collection of elements associated with this event.

public IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>> Elements { get; }

Property Value

IReadOnlyList<CollectionVariableElementSnapshot<TElement, 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 IReadOnlyCollectionVariable<TKey, TElement, TValidationResult> Variable { get; }

Property Value

IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>