using System;
namespace Artemis.Core;
///
/// Represents an attribute that can be used to provide metadata on a node
///
public class NodeAttribute : Attribute
{
#region Properties & Fields
///
/// Gets the name of the node
///
public string Name { get; }
///
/// Gets the description of the node
///
public string Description { get; } = string.Empty;
///
/// Gets the category of the node
///
public string Category { get; } = string.Empty;
///
/// Gets the help URL of the node
///
public string HelpUrl { get; init; } = string.Empty;
///
/// Gets the primary input type of the node
///
public Type? InputType { get; init; }
///
/// Gets the primary output type of the node
///
public Type? OutputType { get; init; }
#endregion
#region Constructors
///
/// Creates a new instance of the class
///
public NodeAttribute(string name)
{
Name = name;
}
///
/// Creates a new instance of the class
///
public NodeAttribute(string name, string description)
{
Name = name;
Description = description;
}
///
/// Creates a new instance of the class
///
public NodeAttribute(string name, string description, string category)
{
Name = name;
Description = description;
Category = category;
}
///
/// Creates a new instance of the class
///
public NodeAttribute(string name, string description, string category, string helpUrl)
{
Name = name;
Description = description;
Category = category;
HelpUrl = helpUrl;
}
#endregion
}