public Command(MethodInfo aMethod, string alias, string hint) { method = aMethod; name = !string.IsNullOrEmpty(alias) ? alias : method.Name; this.hint = hint; parms = ConsoleParam.GenerateParams(method); }
public Command(MethodInfo aMethod) { method = aMethod; var commandAttr = System.Attribute.GetCustomAttribute(method, typeof(ConsoleCommandAttribute), true) as ConsoleCommandAttribute; if (commandAttr != null) { name = !string.IsNullOrEmpty(commandAttr.alias) ? commandAttr.alias : method.Name; hint = commandAttr.hint; } else { name = method.Name; hint = ""; } parms = ConsoleParam.GenerateParams(method); }