using System;
using System.Collections.Generic;
using System.ComponentModel;
using Artemis.Core.Events;
namespace Artemis.Core;
///
/// Represents a node script
///
public interface INodeScript : INotifyPropertyChanged, IDisposable, IStorageModel, IPluginFeatureDependent
{
///
/// Gets the name of the node script.
///
string Name { get; }
///
/// Gets the description of the node script.
///
string Description { get; }
///
/// Gets an enumerable of all the nodes on this script.
///
IEnumerable Nodes { get; }
///
/// Gets the return type of the node script.
///
Type ResultType { get; }
///
/// Gets or sets the context of the node script, usually a or
/// .
///
object? Context { get; set; }
///
/// Occurs whenever a node was added to the script
///
event EventHandler>? NodeAdded;
///
/// Occurs whenever a node was removed from the script
///
event EventHandler>? NodeRemoved;
///
/// Runs the script, evaluating nodes where needed
///
void Run();
///
/// Adds a node to the script
///
/// The node to add
void AddNode(INode node);
///
/// Removes a node from the script
///
/// Note: If the node is you must dispose it yourself, unless you plan to reuse the
/// node.
///
///
/// The node to remove
void RemoveNode(INode node);
///
/// Loads missing connections between the nodes of this node script from storage
///
void LoadConnections();
}
///
/// Represents a node script with a result value of type
///
/// The type of result value
public interface INodeScript : INodeScript
{
///
/// Gets the result of the script
///
T? Result { get; }
}