Class NotifyReversableValue<T>
base implementation of a reversable notify value
Implements
Inherited Members
Namespace: NMF.Expressions
Assembly: NMF.Expressions.dll
Syntax
public class NotifyReversableValue<T> : INotifyReversableValue<T>, INotifyValue<T>, INotifiable, IDisposable, INotifyPropertyChanged, ISuccessorList
Type Parameters
Name | Description |
---|---|
T | The element type |
Constructors
| Edit this page View SourceNotifyReversableValue(Expression<Func<T>>, IDictionary<string, object>)
Create a new instance
Declaration
public NotifyReversableValue(Expression<Func<T>> expression, IDictionary<string, object> parameterMappings = null)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T>> | expression | The underlying expression |
IDictionary<string, object> | parameterMappings | Parameter mappings |
Properties
| Edit this page View SourceAllSuccessors
Declaration
public IEnumerable<INotifiable> AllSuccessors { get; }
Property Value
Type | Description |
---|---|
IEnumerable<INotifiable> |
Count
The number of elements
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Dependencies
Nodes that notify this node.
Declaration
public IEnumerable<INotifiable> Dependencies { get; }
Property Value
Type | Description |
---|---|
IEnumerable<INotifiable> |
ExecutionMetaData
Used by the execution engine during incremental execution.
Declaration
public ExecutionMetaData ExecutionMetaData { get; }
Property Value
Type | Description |
---|---|
ExecutionMetaData |
HasSuccessors
True, if there is any successor, otherwise False
Declaration
public bool HasSuccessors { get; }
Property Value
Type | Description |
---|---|
bool |
IsAttached
True, if successors are attached, otherwise False
Declaration
public bool IsAttached { get; }
Property Value
Type | Description |
---|---|
bool |
IsReversable
Checks whether it is allowed to set values
Declaration
public bool IsReversable { get; }
Property Value
Type | Description |
---|---|
bool |
Successors
The nodes that will get notified by this node.
Declaration
public ISuccessorList Successors { get; }
Property Value
Type | Description |
---|---|
ISuccessorList |
Value
Gets or sets the current value
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T |
Methods
| Edit this page View SourceDispose()
Declaration
public void Dispose()
GetSuccessor(int)
Gets the successor at the given index
Declaration
public INotifiable GetSuccessor(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index |
Returns
Type | Description |
---|---|
INotifiable | The DDG node with the given index |
Notify(IList<INotificationResult>)
Gets called when one of the dependencies signals a notification.
Declaration
public virtual INotificationResult Notify(IList<INotificationResult> sources)
Parameters
Type | Name | Description |
---|---|---|
IList<INotificationResult> | sources | Contains information about what triggered this notification. |
Returns
Type | Description |
---|---|
INotificationResult | An object describing the changes that happened in this notification. |
OnAttach()
Occurs when this node gets (re)attached to another node for the first time
Declaration
protected virtual void OnAttach()
OnDetach()
Occurs when the last successor of this node gets removed
Declaration
protected virtual void OnDetach()
OnPropertyChanged(string)
Raises PropertyChanged
Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | the name of the property |
OnValueChanged(T, T)
Gets called when the value changed
Declaration
protected virtual void OnValueChanged(T oldValue, T newValue)
Parameters
Type | Name | Description |
---|---|---|
T | oldValue | old value |
T | newValue | new value |
Set(INotifiable)
Add the given DDG node to the list
Declaration
public void Set(INotifiable node)
Parameters
Type | Name | Description |
---|---|---|
INotifiable | node | The DDG node to add |
SetDummy()
Sets a dummy
Declaration
public void SetDummy()
Unset(INotifiable, bool)
Unset the given DDG node as successor
Declaration
public void Unset(INotifiable node, bool leaveDummy = false)
Parameters
Type | Name | Description |
---|---|---|
INotifiable | node | the DDG node |
bool | leaveDummy | True, to leave the dummy in operation, otherwise False |
UnsetAll()
Clear the list
Declaration
public void UnsetAll()
Events
| Edit this page View SourcePropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |
ValueChanged
Gets fired when the value changed
Declaration
public event EventHandler<ValueChangedEventArgs> ValueChanged
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |