Exemplo n.º 1
0
        private static SortedList <string, IEtlConsoleCommand> GetCommandsByNames()
        {
            var commands        = EtlConsoleCommandProvider.GetCommands();
            var commandsByNames = new SortedList <string, IEtlConsoleCommand>(StringComparer.InvariantCultureIgnoreCase);

            foreach (var command in commands)
            {
                commandsByNames.Add(command.CommandName, command);
            }

            return(commandsByNames);
        }
Exemplo n.º 2
0
        private static IEtlConsoleCommand FindCommandByName(string commandName)
        {
            var commands = EtlConsoleCommandProvider.GetCommands();

            foreach (var command in commands)
            {
                if (string.Equals(command.CommandName, commandName, StringComparison.InvariantCultureIgnoreCase))
                {
                    return(command);
                }
            }

            return(null);
        }