26 lines
893 B
C#
26 lines
893 B
C#
using System;
|
|
|
|
namespace ShrinkCommand
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
|
|
public sealed class ShrinkCommandSubscriberAttribute : Attribute
|
|
{
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
|
|
public sealed class ShrinkCommandAttribute : Attribute
|
|
{
|
|
public ShrinkCommandAttribute(string path)
|
|
{
|
|
Path = string.IsNullOrWhiteSpace(path) ? string.Empty : path.Trim();
|
|
}
|
|
|
|
public string Path { get; }
|
|
public string Description { get; set; } = string.Empty;
|
|
public string Permission { get; set; } = string.Empty;
|
|
public ShrinkCommandSourceKind SourceKind { get; set; } = ShrinkCommandSourceKind.Any;
|
|
public bool Hidden { get; set; }
|
|
public string[] Aliases { get; set; } = Array.Empty<string>();
|
|
}
|
|
}
|