MosswartMassacre/Unused/Decal.Adapter/ControlReferenceArrayAttribute.cs
2025-06-09 02:03:11 +02:00

27 lines
683 B
C#

using System;
using System.Collections.ObjectModel;
namespace Decal.Adapter;
/// <summary>
/// ControlReferenceArray AutoWireup
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public sealed class ControlReferenceArrayAttribute : ViewBaseAttribute
{
private Collection<string> myControls;
/// <summary>
/// Control collection
/// </summary>
public Collection<string> Controls => myControls;
/// <summary>
/// Constructs a new ControlReference array
/// </summary>
/// <param name="controls">Names of the controls to put in the array</param>
public ControlReferenceArrayAttribute(params string[] controls)
{
myControls = new Collection<string>(controls);
}
}