Class Notifiable
- Namespace
- NMF.Expressions
- Assembly
- NMF.Expressions.dll
Represents a node in a graph which can notify its successors and gets notified by its dependencies.
public abstract class Notifiable : INotifiable, IDisposable, ISuccessorList
- Inheritance
-
Notifiable
- Implements
- Inherited Members
- Extension Methods
Properties
AllSuccessors
public IEnumerable<INotifiable> AllSuccessors { get; }
Property Value
Count
The number of elements
public int Count { get; }
Property Value
Dependencies
Nodes that notify this node.
public abstract IEnumerable<INotifiable> Dependencies { get; }
Property Value
ExecutionMetaData
Used by the execution engine during incremental execution.
public ExecutionMetaData ExecutionMetaData { get; }
Property Value
HasSuccessors
True, if there is any successor, otherwise False
public bool HasSuccessors { get; }
Property Value
IsAttached
True, if successors are attached, otherwise False
public bool IsAttached { get; }
Property Value
this[int]
public INotifiable this[int index] { get; }
Parameters
index
int
Property Value
Successors
The nodes that will get notified by this node.
public ISuccessorList Successors { get; }
Property Value
Methods
Attach()
Gets called when there is a client
protected virtual void Attach()
Detach()
Gets called when there is no client any more
protected virtual void Detach()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetEnumerator()
public IEnumerator<INotifiable> GetEnumerator()
Returns
GetSuccessor(int)
Gets the successor with the given index
public INotifiable GetSuccessor(int index)
Parameters
index
intthe index
Returns
- INotifiable
the succesor 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.
Set(INotifiable)
Add the given DDG node to the list
public void Set(INotifiable node)
Parameters
node
INotifiableThe 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
INotifiablethe DDG node
leaveDummy
boolTrue, to leave the dummy in operation, otherwise False
UnsetAll()
Clear the list
public void UnsetAll()
Events
Attached
public event EventHandler Attached
Event Type
Detached
public event EventHandler Detached