public ToolInstallLocalCommand( AppliedOption appliedCommand, ParseResult parseResult, IToolPackageInstaller toolPackageInstaller = null, IToolManifestFinder toolManifestFinder = null, IToolManifestEditor toolManifestEditor = null, ILocalToolsResolverCache localToolsResolverCache = null, IReporter reporter = null) : base(parseResult) { if (appliedCommand == null) { throw new ArgumentNullException(nameof(appliedCommand)); } _explicitManifestFile = appliedCommand.SingleArgumentOrDefault(ToolAppliedOption.ToolManifest); _reporter = (reporter ?? Reporter.Output); _toolManifestFinder = toolManifestFinder ?? new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory())); _toolManifestEditor = toolManifestEditor ?? new ToolManifestEditor(); _localToolsResolverCache = localToolsResolverCache ?? new LocalToolsResolverCache(); _toolLocalPackageInstaller = new ToolInstallLocalInstaller(appliedCommand, toolPackageInstaller); }
public ToolInstallLocalCommand( ParseResult parseResult, IToolPackageInstaller toolPackageInstaller = null, IToolManifestFinder toolManifestFinder = null, IToolManifestEditor toolManifestEditor = null, ILocalToolsResolverCache localToolsResolverCache = null, IReporter reporter = null) : base(parseResult) { _explicitManifestFile = parseResult.ValueForOption <string>(ToolAppliedOption.ToolManifestOptionAlias); _reporter = (reporter ?? Reporter.Output); _toolManifestFinder = toolManifestFinder ?? new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory())); _toolManifestEditor = toolManifestEditor ?? new ToolManifestEditor(); _localToolsResolverCache = localToolsResolverCache ?? new LocalToolsResolverCache(); _toolLocalPackageInstaller = new ToolInstallLocalInstaller(parseResult, toolPackageInstaller); }