Table of Contents

Class CollectionVariableChangeEvent<TKey, TElement, TValidationResult>

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

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

public class CollectionVariableChangeEvent<TKey, TElement, TValidationResult> : ICollectionVariableChangeEvent<TKey, TElement>, ICollectionVariableChangeEvent, IVariableNodeEvent where TKey : notnull where TElement : notnull

Type Parameters

TKey

Key type.

TElement

Element type.

TValidationResult

Validation result type.

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

Constructors

CollectionVariableChangeEvent(IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>, VariableState, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>, IReadOnlyList<CollectionVariableReplacedElementSnapshot<TElement, TValidationResult>>, VariableChangeSource)

public CollectionVariableChangeEvent(IReadOnlyCollectionVariable<TKey, TElement, TValidationResult> variable, VariableState previousState, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>> addedElements, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>> removedElements, IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>> refreshedElements, IReadOnlyList<CollectionVariableReplacedElementSnapshot<TElement, TValidationResult>> replacedElements, VariableChangeSource source)

Parameters

variable IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>

Variable node that emitted this event.

previousState VariableState

Previous state of the Variable.

addedElements IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

Collection of elements added due to this event.

removedElements IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

Collection of elements removed due to this event.

refreshedElements IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

Collection of elements refreshed due to this event.

replacedElements IReadOnlyList<CollectionVariableReplacedElementSnapshot<TElement, TValidationResult>>

Collection of elements replaced due to this event.

source VariableChangeSource

Specifies the source of this value change.

Properties

AddedElements

Collection of elements added due to this event.

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

Property Value

IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

NewState

Current state of the Variable.

public VariableState NewState { get; }

Property Value

VariableState

PreviousState

Previous state of the Variable.

public VariableState PreviousState { get; }

Property Value

VariableState

RefreshedElements

Collection of elements refreshed due to this event.

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

Property Value

IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

RemovedElements

Collection of elements removed due to this event.

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

Property Value

IReadOnlyList<CollectionVariableElementSnapshot<TElement, TValidationResult>>

ReplacedElements

Collection of elements replaced due to this event.

public IReadOnlyList<CollectionVariableReplacedElementSnapshot<TElement, TValidationResult>> ReplacedElements { get; }

Property Value

IReadOnlyList<CollectionVariableReplacedElementSnapshot<TElement, TValidationResult>>

Source

Specifies the source of this value change.

public VariableChangeSource Source { get; }

Property Value

VariableChangeSource

Variable

Variable node that emitted this event.

public IReadOnlyCollectionVariable<TKey, TElement, TValidationResult> Variable { get; }

Property Value

IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>