コード例 #1
0
        private CommandRegistration(Type commandType)
        {
            CommandType = commandType;
            CommandName = NameFactory.CreateCommandName(commandType);
            _parameters = GetParameters(commandType).ToList();

            CommandParameterValidator.ValidateParameterNamesUniqueness(this);
        }
コード例 #2
0
        protected ConsoleCommand(ILoggerFactory loggerFactory)
        {
            var longestName = NameFactory.CreateCommandName(GetType()).OrderByDescending(name => name.Length).First();

            Logger = loggerFactory.CreateLogger(longestName);
        }