/// <summary> /// Adds an array of downloaders to the collection. /// </summary> /// <param name="downloaders">The downloaders to add to the collection.</param> public void AddRange(AutoUpdateDownloader[] downloaders) { if (downloaders == null) throw new ArgumentNullException("downloaders"); foreach(AutoUpdateDownloader downloader in downloaders) this.Add(downloader); }
/// <summary> /// Removes the downloader from the collection. /// </summary> /// <param name="downloader">The downloader to remove.</param> public void Remove(AutoUpdateDownloader downloader) { if (downloader == null) { throw new ArgumentNullException("downloader"); } if (this.Contains(downloader)) { base.InnerList.Remove(downloader); } }
/// <summary> /// Adds a downloader to the collection. /// </summary> /// <param name="downloader">The downloader to add to the collection.</param> public void Add(AutoUpdateDownloader downloader) { if (downloader == null) throw new ArgumentNullException("downloader"); if (this.Contains(downloader)) throw new AutoUpdateDownloaderAlreadyExistsException(downloader); lock (base.SyncRoot) { base.InnerList.Add(downloader); } }
/// <summary> /// Adds a downloader to the collection. /// </summary> /// <param name="downloader">The downloader to add to the collection.</param> public void Add(AutoUpdateDownloader downloader) { if (downloader == null) { throw new ArgumentNullException("downloader"); } if (this.Contains(downloader)) { throw new AutoUpdateDownloaderAlreadyExistsException(downloader); } lock (base.SyncRoot) { base.InnerList.Add(downloader); } }
/// <summary> /// Determines if the specified downloader exists in the collection. /// </summary> /// <param name="downloader">The downloader to check for.</param> /// <returns></returns> public bool Contains(AutoUpdateDownloader downloader) { if (downloader == null) { throw new ArgumentNullException("downloader"); } lock (base.SyncRoot) { foreach (AutoUpdateDownloader existingDownloader in base.InnerList) { if (string.Compare(existingDownloader.Id, downloader.Id, true) == 0) { return(true); } } } return(false); }
/// <summary> /// Initializes a new instance of the AutoUpdateDownloadDescriptor class /// </summary> /// <param name="manifest">A manifest file containing information about the product, and a summary of the changes new to the version specified</param> /// <param name="downloader">The downloader that will be responsible for downloading the .update</param> /// <param name="options">The options to be used by the downloader while downloading the .update file</param> public AutoUpdateDownloadDescriptor(AutoUpdateManifest manifest, AutoUpdateDownloader downloader, AutoUpdateOptions options) { _manifest = manifest; _downloader = downloader; _options = options; }
/// <summary> /// Initializes a new instance of the AutoUpdateDownloadDescriptor class /// </summary> public AutoUpdateDownloadDescriptor() { _manifest = new AutoUpdateManifest(); _downloader = null; _options = null; }
/// <summary> /// Removes the downloader from the collection. /// </summary> /// <param name="downloader">The downloader to remove.</param> public void Remove(AutoUpdateDownloader downloader) { if (downloader == null) throw new ArgumentNullException("downloader"); if (this.Contains(downloader)) base.InnerList.Remove(downloader); }
/// <summary> /// Determines if the specified downloader exists in the collection. /// </summary> /// <param name="downloader">The downloader to check for.</param> /// <returns></returns> public bool Contains(AutoUpdateDownloader downloader) { if (downloader == null) throw new ArgumentNullException("downloader"); lock (base.SyncRoot) { foreach (AutoUpdateDownloader existingDownloader in base.InnerList) if (string.Compare(existingDownloader.Id, downloader.Id, true) == 0) return true; } return false; }
/// <summary> /// Initializes a new instance of the AutoUpdateDownloadDescriptor class /// </summary> /// <param name="manifest">A manifest file containing information about the product, and a summary of the changes new to the version specified</param> /// <param name="downloader">The downloader that will be responsible for downloading the .update</param> /// <param name="options">The options to be used by the downloader while downloading the .update file</param> public AutoUpdateDownloadDescriptor(AutoUpdateManifest manifest, AutoUpdateDownloader downloader, AutoUpdateOptions options) { _manifest = manifest; _downloader = downloader; _options = options; }
/// <summary> /// Initializes a new instance of the AutoUpdateDownloadDescriptor class /// </summary> public AutoUpdateDownloadDescriptor() { _manifest = new AutoUpdateManifest(); _downloader = null; _options = null; }
public AutoUpdateDownloaderAlreadyExistsException(AutoUpdateDownloader downloader) : base("A downloader with the same Id already exists.") { _downloader = downloader; }
public AutoUpdateDownloaderAlreadyExistsException(AutoUpdateDownloader downloader) : base("A downloader with the same Id already exists.") { _downloader = downloader; }