Table of Contents

Class VariableRootChangeEvent<TKey>

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

Represents a generic value change event emitted by an IReadOnlyVariableRoot<TKey>.

public class VariableRootChangeEvent<TKey> : IVariableRootEvent<TKey>, IVariableRootEvent, IVariableNodeEvent where TKey : notnull

Type Parameters

TKey

Child node's key type.

Inheritance
VariableRootChangeEvent<TKey>
Implements
Inherited Members

Constructors

VariableRootChangeEvent(IReadOnlyVariableRoot<TKey>, TKey, IVariableNodeEvent, VariableState)

Creates a new VariableRootChangeEvent<TKey> instance.

public VariableRootChangeEvent(IReadOnlyVariableRoot<TKey> root, TKey nodeKey, IVariableNodeEvent sourceEvent, VariableState previousState)

Parameters

root IReadOnlyVariableRoot<TKey>

Variable node that emitted this event.

nodeKey TKey

Key of the child node that caused this event.

sourceEvent IVariableNodeEvent

Source child node event.

previousState VariableState

Previous state of the Variable.

Properties

NewState

Current state of the Variable.

public VariableState NewState { get; }

Property Value

VariableState

NodeKey

Key of the child node that caused this event.

public TKey NodeKey { get; }

Property Value

TKey

PreviousState

Previous state of the Variable.

public VariableState PreviousState { get; }

Property Value

VariableState

SourceEvent

Source child node event.

public IVariableNodeEvent SourceEvent { get; }

Property Value

IVariableNodeEvent

Variable

Variable node that emitted this event.

public IReadOnlyVariableRoot<TKey> Variable { get; }

Property Value

IReadOnlyVariableRoot<TKey>