Table of Contents

Class Cell<T>

Namespace
NMF.Expressions
Assembly
NMF.Expressions.dll

Denotes an atomic mutable value

public class Cell<T> : INotifyReversableExpression<T>, INotifyExpression<T>, INotifyExpression, INotifyReversableValue<T>, INotifyValue<T>, INotifiable, IDisposable

Type Parameters

T

The type of the cell

Inheritance
Cell<T>
Implements
Inherited Members
Extension Methods

Properties

CanBeConstant

Determines whether the expression can be replaced by a constant expression

public bool CanBeConstant { get; }

Property Value

bool

Dependencies

Nodes that notify this node.

public IEnumerable<INotifiable> Dependencies { get; }

Property Value

IEnumerable<INotifiable>

ExecutionMetaData

Used by the execution engine during incremental execution.

public ExecutionMetaData ExecutionMetaData { get; }

Property Value

ExecutionMetaData

IsConstant

Determines whether the current expression is a constant

public bool IsConstant { get; }

Property Value

bool

IsParameterFree

Determines whether the current expression contains parameters

public bool IsParameterFree { get; }

Property Value

bool

IsReversable

Checks whether it is allowed to set values

public bool IsReversable { get; }

Property Value

bool

Successors

The nodes that will get notified by this node.

public ISuccessorList Successors { get; }

Property Value

ISuccessorList

Value

Gets or sets the current value

public T Value { get; set; }

Property Value

T

ValueObject

Gets the current value as object

public object ValueObject { get; }

Property Value

object

Methods

ApplyParameters(IDictionary<string, object>, IDictionary<INotifiable, INotifiable>)

Applies the given set of parameters to the expression

public INotifyExpression<T> ApplyParameters(IDictionary<string, object> parameters, IDictionary<INotifiable, INotifiable> trace)

Parameters

parameters IDictionary<string, object>

A set of parameter values

trace IDictionary<INotifiable, INotifiable>

A trace to make sure parameters are only applied once for every DDG node

Returns

INotifyExpression<T>

A new expression with all parameter placeholders replaced with the parameter values

Remarks

In case that the current expression is parameter free, it simply returns itself

Dispose()

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

public void Dispose()

Notify(IList<INotificationResult>)

Gets called when one of the dependencies signals a notification.

public 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 of this cell changed

protected virtual void OnValueChanged(ValueChangedEventArgs e)

Parameters

e ValueChangedEventArgs

the event data

OnValueChanging(ValueChangedEventArgs)

Gets called when the value of this cell is about to change

protected virtual void OnValueChanging(ValueChangedEventArgs e)

Parameters

e ValueChangedEventArgs

the event data

Reduce()

Simplifies the current expression

public INotifyExpression<T> Reduce()

Returns

INotifyExpression<T>

A simpler expression repüresenting the same incremental value (e.g. a constant if this expression can be constant), otherwise itself

Events

ValueChanged

Gets fired when the value changed

public event EventHandler<ValueChangedEventArgs> ValueChanged

Event Type

EventHandler<ValueChangedEventArgs>

ValueChanging

public event EventHandler<ValueChangedEventArgs> ValueChanging

Event Type

EventHandler<ValueChangedEventArgs>