/// <summary>
 /// Creates a new parameter attribute with a blank matching pattern
 /// </summary>
 /// <param name="usage">How the parameter is used in the command</param>
 /// <param name="type">The system type of the parameter expected</param>
 /// <param name="cacheTypes">How this parameter can be found (is it data, is it a live entity)</param>
 /// <param name="optional">Is this parameter optional</param>
 public CommandParameterAttribute(CommandUsage usage, Type type, CacheReferenceType[] cacheTypes, bool optional)
 {
     Usage = usage;
     ParameterType = type;
     CacheTypes = cacheTypes;
     RegExPattern = string.Empty;
     Optional = optional;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="name">名稱</param>
 /// <param name="usage">用法</param>
 public RelayCommandAttribute(string name, CommandUsage usage)
 {
     Name = name;
     Usage = usage;
 }
Esempio n. 3
0
 public IrcCommandAttribute(string commandName, CommandUsage usage = CommandUsage.All)
     : base()
 {
     _commandUsage = usage;
     _commandName = commandName;
 }
Esempio n. 4
0
 private bool Equals(CommandUsage other)
 {
     return string.Equals(Usage, other.Usage) && string.Equals(Description, other.Description) && Order == other.Order;
 }