ace/Source/ACE.Server/Command/CommandHandlerAttribute.cs
Mag-nus 7e256a7fb3
ACE prj to ACE.Server rename (#628)
* ACE.DatLoader renames PositionNew to Position

* Remove comment

* ACE.DatLoader DatDatabase I prefer this type instead.

* Unused references removed

* namespace fixes

* ACE prj to ACE.Server rename

* Appveyor fix I think

* Changelog

* appveyor fixes

* Update AccountTests.cs

* Update ConstructedStatementTests.cs

* Update WeenieSearchTests.cs

* ACE.Tests -> ACE.Server.Tests

* Appvyeor
2018-02-08 17:05:02 -06:00

51 lines
1.6 KiB
C#

using System;
using ACE.Entity.Enum;
namespace ACE.Server.Command
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class CommandHandlerAttribute : Attribute
{
public string Command { get; }
public AccessLevel Access { get; }
public CommandHandlerFlag Flags { get; }
public int ParameterCount { get; }
public string Description { get; }
public string Usage { get; }
public CommandHandlerAttribute(string command, AccessLevel access, CommandHandlerFlag flags = CommandHandlerFlag.None, int parameterCount = -1, string description = "", string usage = "")
{
Command = command;
Access = access;
Flags = flags;
ParameterCount = parameterCount;
Description = description;
Usage = usage;
}
public CommandHandlerAttribute(string command, AccessLevel access, CommandHandlerFlag flags = CommandHandlerFlag.None, string description = "", string usage = "")
{
Command = command;
Access = access;
Flags = flags;
ParameterCount = -1;
Description = description;
Usage = usage;
}
public CommandHandlerAttribute(string command, AccessLevel access, CommandHandlerFlag flags = CommandHandlerFlag.None)
{
Command = command;
Access = access;
Flags = flags;
ParameterCount = -1;
Description = "";
Usage = "";
}
}
}