示例#1
0
        /// <summary>
        /// Initializes an instance of <see cref="CliApplication"/>.
        /// </summary>
        public CliApplication(ApplicationMetadata metadata, ApplicationConfiguration configuration,
                              IConsole console, ICommandInputParser commandInputParser, ICommandSchemaResolver commandSchemaResolver,
                              ICommandFactory commandFactory, ICommandInitializer commandInitializer, IHelpTextRenderer helpTextRenderer)
        {
            _metadata      = metadata.GuardNotNull(nameof(metadata));
            _configuration = configuration.GuardNotNull(nameof(configuration));

            _console               = console.GuardNotNull(nameof(console));
            _commandInputParser    = commandInputParser.GuardNotNull(nameof(commandInputParser));
            _commandSchemaResolver = commandSchemaResolver.GuardNotNull(nameof(commandSchemaResolver));
            _commandFactory        = commandFactory.GuardNotNull(nameof(commandFactory));
            _commandInitializer    = commandInitializer.GuardNotNull(nameof(commandInitializer));
            _helpTextRenderer      = helpTextRenderer.GuardNotNull(nameof(helpTextRenderer));
        }
示例#2
0
        /// <summary>
        /// Initializes an instance of <see cref="CliApplication"/>.
        /// </summary>
        public CliApplication(ApplicationMetadata metadata, ApplicationConfiguration configuration,
                              IConsole console, ICommandInputParser commandInputParser, ICommandSchemaResolver commandSchemaResolver,
                              ICommandFactory commandFactory, ICommandInitializer commandInitializer, IHelpTextRenderer helpTextRenderer)
        {
            _metadata      = metadata;
            _configuration = configuration;

            _console               = console;
            _commandInputParser    = commandInputParser;
            _commandSchemaResolver = commandSchemaResolver;
            _commandFactory        = commandFactory;
            _commandInitializer    = commandInitializer;
            _helpTextRenderer      = helpTextRenderer;
        }