rabidus-test/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Attributes/CommandDescriptionAttribute.cs

19 lines
740 B
C#
Raw Normal View History

2023-08-22 15:41:12 +03:00
using System;
namespace QFSW.QC
{
/// <summary>Provides a command with a description. If the [Command] attribute already provides a description, that will supersede this one. Useful for when you have several [Command]s on a single method.</summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public sealed class CommandDescriptionAttribute : Attribute
{
public readonly string Description;
public readonly bool Valid;
public CommandDescriptionAttribute(string description)
{
Description = description;
Valid = !string.IsNullOrWhiteSpace(description);
}
}
}