Class VariableValidationEvent<TValue, TValidationResult>
Represents a generic validation event emitted by an IReadOnlyVariable<TValue, TValidationResult>.
public class VariableValidationEvent<TValue, TValidationResult> : IVariableValidationEvent<TValidationResult>, IVariableValidationEvent, IVariableNodeEvent
Type Parameters
TValueValue type.
TValidationResultVariable'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>?)
Creates a new VariableValidationEvent<TValue, TValidationResult> instance.
public VariableValidationEvent(IReadOnlyVariable<TValue, TValidationResult> variable, Chain<TValidationResult> previousErrors, Chain<TValidationResult> previousWarnings, VariableState previousState, VariableValueChangeEvent<TValue, TValidationResult>? associatedChange)
Parameters
variableIReadOnlyVariable<TValue, TValidationResult>Variable node that emitted this event.
previousErrorsChain<TValidationResult>Collection of validation errors before the change.
previousWarningsChain<TValidationResult>Collection of validation warnings before the change.
previousStateVariableStatePrevious state of the Variable.
associatedChangeVariableValueChangeEvent<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
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
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>