NodeShell Class

Base functionality shared by all node implementations. New node types can be implemented outside of this assembly only by deriving from one of the generic node classes.

Definition

Namespace: Quine.Graph
Assembly: Quine.Graph (in Quine.Graph.dll) Version: 1.0.0+0ea0706914ee4edf2b0ed66bec3ab4d062a43b68
C#
public abstract class NodeShell : GraphSchemaHook<NodeStateBase>, 
	INodeEventSource
Inheritance
Object    GraphSchemaHook    GraphSchemaHookNodeStateBase    NodeShell
Derived
Implements
INodeEventSource

Constructors

NodeShell Constructs node from deserialized state together with owned input and output ports. No connections are created because target nodes may not have been created yet. NB: No messages can be logged to the shell from constructors because it's too early to subscribe to the events. Any services that can fail should be resolved / initialized from (overridden) LifecycleAsync.

Properties

CancellationToken Used to signal that the graph is being canceled; shared by all nodes.
ConcurrencyLimit Determines how many instances of this node type can run concurrently. Use int.MaxValue for unbounded number of instances.
Id
(Inherited from GraphSchemaHook)
ItemProcessingEventData Information about the item currently being processed.
Owner Parent/owner of this node, or null.
(Inherited from GraphSchemaHook)
PathId Provides IDs of all job nodes from the root (1st element) to this. The byte array is a sequence of integer ids with variable-length encoding (7-bit).
(Inherited from GraphSchemaHook)
State Strongly-typed state. This is NOT an override, but hiding.
(Inherited from GraphSchemaHookT)

Methods

CreateItemProcessingEventData Overriding this method allows to create derived instances of ItemProcessingEventData for reporting of extended progress events.
LifecycleAsync This method defines the complete node lifecycle. Overriding this method allows the node to perform actions before MessageLoopAsync has been started and after it has exited. Notes to implementers: The derived implementation MUST call the base implementation. Most of the protected methods cannot be called before or after this method has executed.
MessageLoopAsync The actual message processing loop for the node.
QueryAsync Sends interactive query to the controlling front-end.
RaiseProcessingBeginEvent Sets current message to m and singals start of processing. If overridden, the base implementation MUST be called.
RaiseProcessingEndEvent Signals end of processing for the message set by RaiseProcessingBeginEvent(GraphMessage) and sets the current message to null. If overridden, the base implementation MUST be called.
RaiseProgressEvent Raises progress event for the message set by RaiseProcessingBeginEvent(GraphMessage). At most one of the arguments can be set to a non-negative value. If overridden, the base implementation MUST be called.
RaiseTraceEvent Raises a trace event. The event is always published to the shell, and then appended to either the item's trace (if ItemProcessingEventData is not null) or to the node's trace if the lifecycle allows it.

Fields

See Also