public static bool TryGetCommand(string command, out ConsoleCommand result) { if (!initialized) Initialize(); result = GetCommand(command); return result != null; }
public static bool TryGetCommand(string command, out ConsoleCommand result) { try { result = GetCommand(command); return true; } catch (NoSuchCommandException) { result = default(ConsoleCommand); return false; } }
public static bool TryGetCommand(string command, out ConsoleCommand result) { try { result = GetCommand(command); return(true); } catch (NoSuchCommandException) { result = default(ConsoleCommand); return(false); } }
public static bool TryGetCommand(string command, out ConsoleCommand result) { if (HasCommand(command)) { result = database[command]; return(true); } else { result = default(ConsoleCommand); return(false); } }
public static void RegisterCommand(string command, string description, string usage, ConsoleCommandCallback callback) { database[command] = new ConsoleCommand(command, description, usage, callback); }
public static void RegisterCommand(string command, string description, string usage, ConsoleCommandCallback callback) { database[command] = new ConsoleCommand(command, description, usage, callback); }