1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.Core/VisualScripting/Pins/OutputPinCollection.cs
Robert 9c117d2773 Nodes - Added gradient nodes
Nodes - Added color gradient pin type
Data bindings - Changed color gradient data bindings to now take a color gradient
2022-09-23 21:41:08 +02:00

42 lines
1008 B
C#

using System;
namespace Artemis.Core;
/// <summary>
/// Represents a collection of output pins containing values of type <typeparamref name="T" />
/// </summary>
/// <typeparam name="T">The type of value the pins in this collection hold</typeparam>
public sealed class OutputPinCollection<T> : PinCollection
{
#region Constructors
internal OutputPinCollection(INode node, string name, int initialCount)
: base(node, name)
{
// Can't do this in the base constructor because the type won't be set yet
for (int i = 0; i < initialCount; i++)
Add(CreatePin());
}
#endregion
#region Methods
/// <inheritdoc />
public override IPin CreatePin()
{
return new OutputPin<T>(Node, string.Empty);
}
#endregion
#region Properties & Fields
/// <inheritdoc />
public override PinDirection Direction => PinDirection.Output;
/// <inheritdoc />
public override Type Type => typeof(T);
#endregion
}