public string[] Exceptions(string command) { if (CommandExceptions.ContainsKey(command)) { return(CommandExceptions.FirstOrDefault(x => x.Key == command).Value); } return(null); }
public string[] Exceptions() { var result = new List <string>(); var commands = ExceptionCommands(); foreach (var cmd in commands) { var list = CommandExceptions.FirstOrDefault(x => x.Key == cmd); result.AddRange( list.Value.Select(x => { return($"{cmd}:{x}"); }) ); } return(result.ToArray()); }