// Token: 0x06000011 RID: 17 RVA: 0x000026F9 File Offset: 0x000008F9 public Command(CommandsBase commandsBase, MethodInfo method, KeyCode keyCode, bool hold = false) { this.Base = commandsBase; this.KeyCode = keyCode; this.Hold = hold; this._method = method; }
// Token: 0x06000014 RID: 20 RVA: 0x0000274C File Offset: 0x0000094C public T AddBase <T>() where T : CommandsBase, new() { CommandsBase commandsBase = Activator.CreateInstance <T>(); List <Command> list = new List <Command>(); foreach (MethodInfo methodInfo in commandsBase.GetType().GetMethods()) { CommandAttribute commandAttribute = methodInfo.GetCustomAttributes(false).FirstOrDefault((object a) => a is CommandAttribute) as CommandAttribute; if (commandAttribute != null) { list.Add(new Command(commandsBase, methodInfo, commandAttribute.KeyCode, commandAttribute.Hold)); } } commandsBase.Commands = list.ToArray(); this.bases.Add(commandsBase); return(commandsBase as T); }