public AppUpdates(IAppUpdateConfig config, ILaunchableFile launchableFile) { Ensure.NotNull(config, nameof(config)); config.Validate(); _releaseStorage = new OrderedReleaseStorage( new SafeReleaseStorage( new WebReleaseStorage(config))); _updatesDirectory = new SafeUpdatesDirectory( new UpdatesDirectory(config.UpdatesPath, config.CurrentVersion) ); _fileLocation = new FileLocation(_updatesDirectory.Path); _downloadable = new SafeDownloadableFile( new DownloadableFile(config.HttpClient)); _validatable = new SafeValidatableFile( new CachingValidatableFile( new ValidatableFile())); _launchable = new SafeLaunchableFile(launchableFile); }
public SafeDownloadableFile(IDownloadableFile origin) { _origin = origin; }
public static void PushToBrowser(IDownloadableFile file) { PushToBrowser(file.ContentType, file.DownloadAsFilename, file.GetContent()); }
public void TestInitialize() { _origin = Substitute.For <IDownloadableFile>(); }