Class Notifiable
Represents a node in a graph which can notify its successors and gets notified by its dependencies.
Inherited Members
Namespace: NMF.Expressions
Assembly: NMF.Expressions.dll
Syntax
public abstract class Notifiable : INotifiable, IDisposable, ISuccessorList
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 abstract 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 |
this[int]
Declaration
public INotifiable this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index |
Property Value
Type | Description |
---|---|
INotifiable |
Successors
The nodes that will get notified by this node.
Declaration
public ISuccessorList Successors { get; }
Property Value
Type | Description |
---|---|
ISuccessorList |
Methods
| Edit this page View SourceAttach()
Gets called when there is a client
Declaration
protected virtual void Attach()
Detach()
Gets called when there is no client any more
Declaration
protected virtual void Detach()
Dispose()
Declaration
public void Dispose()
GetEnumerator()
Declaration
public IEnumerator<INotifiable> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<INotifiable> |
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 abstract 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. |
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 SourceAttached
Declaration
public event EventHandler Attached
Event Type
Type | Description |
---|---|
EventHandler |
Detached
Declaration
public event EventHandler Detached
Event Type
Type | Description |
---|---|
EventHandler |