Artemis Artemis
Artemis Artemis

Search Results for

    Class NodeScript

    Represents a node script

    Inheritance
    object
    CorePropertyChanged
    NodeScript
    NodeScript<T>
    Implements
    INodeScript
    IDisposable
    IStorageModel
    Namespace: Artemis.Core
    Assembly: Artemis.Core.dll
    Syntax
    public abstract class NodeScript : CorePropertyChanged, INodeScript, IDisposable, IStorageModel

    Constructors

    NodeScript(string, string, object?, List<DefaultNode>?)

    Creates a new instance of the NodeScript class with a name, description and optional context

    Declaration
    protected NodeScript(string name, string description, object? context = null, List<DefaultNode>? defaultNodes = null)
    Parameters
    Type Name Description
    string name

    The name of the node script

    string description

    The description of the node script

    object context

    The context of the node script, usually a Profile or ProfileConfiguration

    List<DefaultNode> defaultNodes

    A list of default nodes to add to the node script.

    Properties

    Context

    Gets or sets the context of the node script, usually a Profile or ProfileConfiguration.

    Declaration
    public object? Context { get; set; }
    Property Value
    Type Description
    object

    Description

    Gets the description of the node script.

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    string

    Entity

    Gets the entity used to store this script.

    Declaration
    public NodeScriptEntity Entity { get; }
    Property Value
    Type Description
    NodeScriptEntity

    ExitNode

    Gets or sets the exit node of the script

    Declaration
    protected INode ExitNode { get; set; }
    Property Value
    Type Description
    INode

    ExitNodeConnected

    Gets a boolean indicating whether the exit node is connected to any other nodes

    Declaration
    public abstract bool ExitNodeConnected { get; }
    Property Value
    Type Description
    bool

    Name

    Gets the name of the node script.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Nodes

    Gets an enumerable of all the nodes on this script.

    Declaration
    public IEnumerable<INode> Nodes { get; }
    Property Value
    Type Description
    IEnumerable<INode>

    ResultType

    Gets the return type of the node script.

    Declaration
    public abstract Type ResultType { get; }
    Property Value
    Type Description
    Type

    Methods

    AddNode(INode)

    Adds a node to the script

    Declaration
    public void AddNode(INode node)
    Parameters
    Type Name Description
    INode node

    The node to add

    Dispose()

    Declaration
    public void Dispose()

    Load()

    Loads the model from its associated entity

    Declaration
    public void Load()

    LoadConnections()

    Loads missing connections between the nodes of this node script from storage

    Declaration
    public void LoadConnections()

    RemoveNode(INode)

    Removes a node from the script

    Note: If the node is IDisposable you must dispose it yourself, unless you plan to reuse the node.

    Declaration
    public void RemoveNode(INode node)
    Parameters
    Type Name Description
    INode node

    The node to remove

    Run()

    Runs the script, evaluating nodes where needed

    Declaration
    public void Run()

    Save()

    Saves the model to its associated entity

    Declaration
    public void Save()

    Events

    NodeAdded

    Occurs whenever a node was added to the script

    Declaration
    public event EventHandler<SingleValueEventArgs<INode>>? NodeAdded
    Event Type
    Type Description
    EventHandler<SingleValueEventArgs<INode>>

    NodeRemoved

    Occurs whenever a node was removed from the script

    Declaration
    public event EventHandler<SingleValueEventArgs<INode>>? NodeRemoved
    Event Type
    Type Description
    EventHandler<SingleValueEventArgs<INode>>

    Implements

    INodeScript
    IDisposable
    IStorageModel

    Extension Methods

    NodeScriptExtension.Organize(NodeScript)
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.