public ImportCommand(IImporterLocator importerLocator, IOctopusFileSystem fileSystem, IOctopusRepositoryFactory repositoryFactory, ILog log)
            : base(repositoryFactory, log, fileSystem)
        {
            this.importerLocator = importerLocator;

            var options = Options.For("Import");
            options.Add("type=", "The Octopus object type to import", v => Type = v);
            options.Add("filePath=", "The full path and name of the exported file", v => FilePath = v);
            options.Add("project=", "[Optional] The name of the project", v => Project = v);
            options.Add("dryRun", "[Optional] Perform a dry run of the import", v => DryRun = true);
        }
        public ImportCommand(IImporterLocator importerLocator, IOctopusFileSystem fileSystem, IOctopusRepositoryFactory repositoryFactory, ILog log)
            : base(repositoryFactory, log)
        {
            this.importerLocator = importerLocator;
            this.fileSystem      = fileSystem;

            var options = Options.For("Import");

            options.Add("type=", "The Octopus object type to import", v => Type = v);
            options.Add("filePath=", "The full path and name of the exported file", v => FilePath = v);
            options.Add("project=", "[Optional] The name of the project", v => Project            = v);
        }
Beispiel #3
0
        public ImportCommand(IImporterLocator importerLocator, IOctopusFileSystem fileSystem, IOctopusAsyncRepositoryFactory repositoryFactory, ILogger log, IOctopusClientFactory clientFactory, ICommandOutputProvider commandOutputProvider)
            : base(clientFactory, repositoryFactory, fileSystem, commandOutputProvider)
        {
            this.importerLocator = importerLocator;

            var options = Options.For("Import");

            options.Add <string>("type=", "The Octopus object type to import", v => Type = v);
            options.Add <string>("filePath=", "The full path and name of the exported file", v => FilePath = v);
            options.Add <string>("project=", "[Optional] The name of the project", v => Project            = v);
            options.Add <bool>("dryRun", "[Optional] Perform a dry run of the import", v => DryRun         = true);
        }