예제 #1
0
 public Downloader(IFileDownloader fileDownloader, IFileSystem fileSystem, string product, IDownloadUrlResolver downloadUrlResolver)
 {
     _fileDownloader      = fileDownloader;
     _fileSystem          = fileSystem;
     _product             = product;
     _downloadUrlResolver = downloadUrlResolver;
 }
예제 #2
0
 public ProductInstaller(IFileSystem fileSystem, ProcessExecutor processExecutor, IFileSystemCommands commands,
                         string installLocation, IDownloadUrlResolver downloadUrlResolver)
 {
     _fileSystem          = fileSystem;
     _processExecutor     = processExecutor;
     _commands            = commands;
     _installLocation     = installLocation;
     _downloadUrlResolver = downloadUrlResolver;
 }
예제 #3
0
        public static InstallJob CreateInstallJob(string product, FileSystem fileSystem,
                                                  FileSystemCommandsBoundary commands, Func <ProductInstallationMetaData, bool> productMatcher,
                                                  IDownloadUrlResolver downloadUrlResolver)
        {
            var chefProduct = new ChefProduct(product, new InstalledProductsFinder(),
                                              new ProductInstaller(fileSystem, new ProcessExecutor(() => new ProcessBoundary()), commands,
                                                                   $@"{ServerSettings.Instance.InstallRoot}\opscode", downloadUrlResolver),
                                              productMatcher);

            return(CreateInstallJob(chefProduct));
        }
예제 #4
0
 public static string FullPathToStagedInstaller(this IDownloadUrlResolver resolver, string version)
 {
     return(Path.Combine(Downloader.StagingDirectory, resolver.FilenameFor(version)));
 }
예제 #5
0
 public static DownloadJob CreateDownloadJob(FileSystem fileSystem, string product,
                                             IDownloadUrlResolver downloadUrlResolver)
 {
     return(new DownloadJob(new Downloader(new FileDownloader(), fileSystem, product, downloadUrlResolver),
                            SystemClock.Instance));
 }
예제 #6
0
 public CafeInstaller(IFileSystemCommands commands, IDownloadUrlResolver resolver, string updaterDirectory)
 {
     _commands         = commands;
     _resolver         = resolver;
     _updaterDirectory = updaterDirectory;
 }