Table of Contents

Class NotifyValue<T>

Namespace
NMF.Expressions
Assembly
NMF.Expressions.dll

Abstract base implementation of notify value

public abstract class NotifyValue<T> : INotifyValue<T>, INotifiable, IDisposable, ISuccessorList

Type Parameters

T

The element type

Inheritance
NotifyValue<T>
Implements
Derived
Inherited Members
Extension Methods

Properties

AllSuccessors

public IEnumerable<INotifiable> AllSuccessors { get; }

Property Value

IEnumerable<INotifiable>

Count

The number of elements

public int Count { get; }

Property Value

int

Dependencies

Nodes that notify this node.

public abstract IEnumerable<INotifiable> Dependencies { get; }

Property Value

IEnumerable<INotifiable>

ExecutionMetaData

Used by the execution engine during incremental execution.

public ExecutionMetaData ExecutionMetaData { get; }

Property Value

ExecutionMetaData

HasSuccessors

True, if there is any successor, otherwise False

public bool HasSuccessors { get; }

Property Value

bool

IsAttached

True, if successors are attached, otherwise False

public bool IsAttached { get; }

Property Value

bool

Successors

The nodes that will get notified by this node.

public ISuccessorList Successors { get; }

Property Value

ISuccessorList

Value

Gets the current value

public abstract T Value { get; }

Property Value

T

Methods

Attach()

protected virtual void Attach()

Detach()

protected virtual void Detach()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetSuccessor(int)

Gets the successor at the given index

public INotifiable GetSuccessor(int index)

Parameters

index int

The index

Returns

INotifiable

The DDG node with the given index

Notify(IList<INotificationResult>)

Gets called when one of the dependencies signals a notification.

public abstract INotificationResult Notify(IList<INotificationResult> sources)

Parameters

sources IList<INotificationResult>

Contains information about what triggered this notification.

Returns

INotificationResult

An object describing the changes that happened in this notification.

OnValueChanged(ValueChangedEventArgs)

Gets called when the value changed

protected virtual void OnValueChanged(ValueChangedEventArgs e)

Parameters

e ValueChangedEventArgs

event args

OnValueChanged(T, T)

Raises the ValueChanged event

protected void OnValueChanged(T oldValue, T newValue)

Parameters

oldValue T

old value

newValue T

new value

Set(INotifiable)

Add the given DDG node to the list

public void Set(INotifiable node)

Parameters

node INotifiable

The DDG node to add

SetDummy()

Sets a dummy

public void SetDummy()

Unset(INotifiable, bool)

Unset the given DDG node as successor

public void Unset(INotifiable node, bool leaveDummy = false)

Parameters

node INotifiable

the DDG node

leaveDummy bool

True, to leave the dummy in operation, otherwise False

UnsetAll()

Clear the list

public void UnsetAll()

Events

ValueChanged

Gets fired when the value changed

public event EventHandler<ValueChangedEventArgs> ValueChanged

Event Type

EventHandler<ValueChangedEventArgs>