/// <summary> /// Initializes a new instance of the AutoUpdateManager class /// </summary> /// <param name="options">The options that will control the behaviour of the engine</param> /// <param name="productToUpdate">A product descriptor that will be used as the product to find updates for</param> public AutoUpdateManager(AutoUpdateOptions options, AutoUpdateProductDescriptor productToUpdate) { if (options == null) { throw new ArgumentNullException("options"); } if (productToUpdate == null) { throw new ArgumentNullException("productToUpdate"); } /* * however if we wanted to not do the norm * and create an update engine that could update another app * then we are all about it, makes no never mind at all * */ _options = options; _productToUpdate = productToUpdate; _downloaders = new AutoUpdateDownloaderList(); _downloaders.AddRange(this.CreateDownloadersForInternalUse()); if (_options.DownloadPath == null || _options.DownloadPath == string.Empty) _options.DownloadPath = this.GetBootstrapPath(); }
/// <summary> /// Initializes a new instance of the AutoUpdateManager class /// </summary> /// <param name="options">The options that will control the behaviour of the engine</param> public AutoUpdateManager(AutoUpdateOptions options) { // we can't do anything without options to control our behavior if (options == null) { throw new ArgumentNullException("options"); } /* * the default options will be used * to update the current hosting engine * and download into the bootstrap directory along side the other versions of this hosting engine * */ _options = options; _productToUpdate = AutoUpdateProductDescriptor.FromAssembly(PluginContext.Current.StartingAssembly, PluginContext.Current.AppVersion); _downloaders = new AutoUpdateDownloaderList(); _downloaders.AddRange(this.CreateDownloadersForInternalUse()); if (_options.DownloadPath == null || _options.DownloadPath == string.Empty) _options.DownloadPath = this.GetBootstrapPath(); }