1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

42 lines
863 B
C#

using System;
using Artemis.Core.VisualScripting;
namespace Artemis.VisualScripting.Model
{
public sealed class OutputPin<T> : Pin
{
#region Properties & Fields
public override Type Type { get; } = typeof(T);
public override object PinValue => Value;
public override PinDirection Direction => PinDirection.Output;
private T _value;
public T Value
{
get
{
if (!IsEvaluated)
Node?.Evaluate();
return _value;
}
set
{
_value = value;
IsEvaluated = true;
}
}
#endregion
#region Constructors
internal OutputPin(INode node, string name)
: base(node, name)
{ }
#endregion
}
}