示例#1
0
        public string[] Exceptions(string command)
        {
            if (CommandExceptions.ContainsKey(command))
            {
                return(CommandExceptions.FirstOrDefault(x => x.Key == command).Value);
            }

            return(null);
        }
示例#2
0
        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());
        }