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
TThe type of the cell
- Inheritance
-
Cell<T>
- Implements
-
INotifyValue<T>
- Inherited Members
- Extension Methods
Properties
CanBeConstant
Determines whether the expression can be replaced by a constant expression
public bool CanBeConstant { get; }
Property Value
Dependencies
Nodes that notify this node.
public IEnumerable<INotifiable> Dependencies { get; }
Property Value
ExecutionMetaData
Used by the execution engine during incremental execution.
public ExecutionMetaData ExecutionMetaData { get; }
Property Value
IsConstant
Determines whether the current expression is a constant
public bool IsConstant { get; }
Property Value
IsParameterFree
Determines whether the current expression contains parameters
public bool IsParameterFree { get; }
Property Value
IsReversable
Checks whether it is allowed to set values
public bool IsReversable { get; }
Property Value
Successors
The nodes that will get notified by this node.
public ISuccessorList Successors { get; }
Property Value
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
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
parametersIDictionary<string, object>A set of parameter values
traceIDictionary<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
sourcesIList<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
eValueChangedEventArgsthe event data
OnValueChanging(ValueChangedEventArgs)
Gets called when the value of this cell is about to change
protected virtual void OnValueChanging(ValueChangedEventArgs e)
Parameters
eValueChangedEventArgsthe 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
ValueChanging
public event EventHandler<ValueChangedEventArgs> ValueChanging