ShellMe.CommandLine.CommandHandling.CommandFactory.GetCommand C# (CSharp) Méthode

GetCommand() public méthode

public GetCommand ( string commandName ) : ICommand
commandName string
Résultat ICommand
        public ICommand GetCommand(string commandName)
        {
            var commandMetaData = _commandMetaDataList
                            .FirstOrDefault(bundle => bundle.Command.Name.Equals(commandName, StringComparison.OrdinalIgnoreCase));

            //We allways want to return a fresh instance to have an isolated scope (e.g. no properties interfering each other)
            return commandMetaData == null ? null : CreateCommand(commandMetaData);
        }