Exemplo n.º 1
0
        public LegacyListCommand(
            NewCommand parentCommand,
            Func <ParseResult, ITemplateEngineHost> hostBuilder,
            Func <ParseResult, ITelemetryLogger> telemetryLoggerBuilder,
            NewCommandCallbacks callbacks)
            : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--list")
        {
            this.IsHidden = true;
            this.AddAlias("-l");
            AddValidator(ValidateParentCommandArguments);

            parentCommand.AddNoLegacyUsageValidators(this, except: Filters.Values.Concat(new Symbol[] { ColumnsAllOption, ColumnsOption, NewCommand.ShortNameArgument }).ToArray());
        }
Exemplo n.º 2
0
 internal BaseUpdateCommand(
     NewCommand parentCommand,
     Func <ParseResult, ITemplateEngineHost> hostBuilder,
     Func <ParseResult, ITelemetryLogger> telemetryLoggerBuilder,
     NewCommandCallbacks callbacks,
     string commandName,
     string description)
     : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, description)
 {
     ParentCommand = parentCommand;
     this.AddOption(InteractiveOption);
     this.AddOption(AddSourceOption);
 }
Exemplo n.º 3
0
        internal BaseSearchCommand(
            NewCommand parentCommand,
            Func <ParseResult, ITemplateEngineHost> hostBuilder,
            Func <ParseResult, ITelemetryLogger> telemetryLoggerBuilder,
            NewCommandCallbacks callbacks,
            string commandName)
            : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_Search_Description)
        {
            ParentCommand = parentCommand;
            Filters       = SetupFilterOptions(SupportedFilters);

            this.AddArgument(NameArgument);
            SetupTabularOutputOptions(this);
        }
Exemplo n.º 4
0
 internal BaseInstallCommand(
     NewCommand parentCommand,
     Func <ParseResult, ITemplateEngineHost> hostBuilder,
     Func <ParseResult, ITelemetryLogger> telemetryLoggerBuilder,
     NewCommandCallbacks callbacks,
     string commandName)
     : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_Install_Description)
 {
     ParentCommand = parentCommand;
     this.AddArgument(NameArgument);
     this.AddOption(InteractiveOption);
     this.AddOption(AddSourceOption);
     this.AddOption(ForceOption);
 }