public static void AddCommandsToTerminal(string name, TerminalCommand command) { if (!Commands.ContainsKey(name)) { Commands.Add(name, command); } }
public Command(object instance, MethodInfo method) { TerminalCommand attribute = GetAttributeData(method); this.Instance = instance; this.Method = method; this.Class = method.DeclaringType.ToString(); this.Description = attribute.Description; this.Parameters = method.GetParameters(); this.Name = attribute.Name ?? method.Name; }