mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-07-30 17:30:40 +00:00
36 lines
1008 B
C#
36 lines
1008 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Esiur.Resource.Attributes
|
|
{
|
|
[AttributeUsage(
|
|
AttributeTargets.Class |
|
|
AttributeTargets.Struct |
|
|
AttributeTargets.Interface |
|
|
AttributeTargets.Enum |
|
|
AttributeTargets.Delegate |
|
|
AttributeTargets.Method |
|
|
AttributeTargets.Property |
|
|
AttributeTargets.Field |
|
|
AttributeTargets.Event |
|
|
AttributeTargets.Parameter |
|
|
AttributeTargets.ReturnValue,
|
|
AllowMultiple = false,
|
|
Inherited = true)]
|
|
public sealed class UsageAttribute : Attribute
|
|
{
|
|
public string Value { get; }
|
|
|
|
public UsageAttribute(string value)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(value))
|
|
throw new ArgumentException(
|
|
"Usage text cannot be null or empty.",
|
|
nameof(value));
|
|
|
|
Value = value;
|
|
}
|
|
}
|
|
}
|