DocSpace-buildtools/common/services/ASC.TelegramService/Core/Attributes.cs

24 lines
563 B
C#
Raw Normal View History

2022-03-15 16:59:24 +00:00
namespace ASC.TelegramService.Core;
2022-02-17 11:16:52 +00:00
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public class CommandAttribute : Attribute
2020-09-24 14:30:27 +00:00
{
2022-02-17 11:16:52 +00:00
public CommandAttribute(string name)
2020-09-24 14:30:27 +00:00
{
2022-02-17 11:16:52 +00:00
Name = name.ToLowerInvariant();
2020-09-24 14:30:27 +00:00
}
2022-02-17 11:16:52 +00:00
public string Name { get; private set; }
}
2020-09-24 14:30:27 +00:00
2022-02-17 11:16:52 +00:00
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public class ParamParserAttribute : Attribute
{
public ParamParserAttribute(Type type)
{
Type = type;
2020-09-24 14:30:27 +00:00
}
2022-02-17 11:16:52 +00:00
public Type Type { get; private set; }
2020-09-24 14:30:27 +00:00
}