示例#1
0
 public ToolPackageInstaller(
     IToolPackageStore store,
     IProjectRestorer projectRestorer,
     FilePath?tempProject      = null,
     DirectoryPath?offlineFeed = null)
 {
     _store           = store ?? throw new ArgumentNullException(nameof(store));
     _projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
     _tempProject     = tempProject;
     _offlineFeed     = offlineFeed ?? new DirectoryPath(CliFolderPathCalculator.CliFallbackFolderPath);
 }
 public ToolPackageInstallerMock(
     IFileSystem fileSystem,
     IToolPackageStore store,
     IProjectRestorer projectRestorer,
     Action installCallback = null)
 {
     _fileSystem      = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _store           = store ?? throw new ArgumentNullException(nameof(store));
     _projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
     _installCallback = installCallback;
 }
示例#3
0
 public ToolPackageInstallerMock(
     IFileSystem fileSystem,
     IToolPackageStore store,
     IProjectRestorer projectRestorer,
     Action installCallback = null,
     Dictionary <PackageId, IEnumerable <string> > warningsMap = null)
 {
     _fileSystem      = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _store           = store ?? throw new ArgumentNullException(nameof(store));
     _projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
     _installCallback = installCallback;
     _warningsMap     = warningsMap ?? new Dictionary <PackageId, IEnumerable <string> >();
 }
示例#4
0
 public ToolPackageObtainer(
     DirectoryPath toolsPath,
     DirectoryPath offlineFeedPath,
     Func <FilePath> getTempProjectPath,
     Lazy <string> bundledTargetFrameworkMoniker,
     IProjectRestorer projectRestorer
     )
 {
     _getTempProjectPath            = getTempProjectPath;
     _bundledTargetFrameworkMoniker = bundledTargetFrameworkMoniker;
     _projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
     _toolsPath       = toolsPath;
     _offlineFeedPath = offlineFeedPath;
 }