public void Remove(AutoUpdateDownloader downloader)
		{
			if (downloader ==  null)
				throw new ArgumentNullException("downloader");

			if (this.Contains(downloader))
				base.InnerList.Remove(downloader);
		}
		public void AddRange(AutoUpdateDownloader[] downloaders)
		{
			if (downloaders == null)
				throw new ArgumentNullException("downloaders");

			foreach(AutoUpdateDownloader downloader in downloaders)
				this.Add(downloader);
		}
		public void Add(AutoUpdateDownloader downloader)
		{
			if (downloader ==  null)
				throw new ArgumentNullException("downloader");

			if (this.Contains(downloader))
				throw new AutoUpdateDownloaderAlreadyExistsException(downloader);

			base.InnerList.Add(downloader);
		}
		public bool Contains(AutoUpdateDownloader downloader)
		{
			if (downloader ==  null)
				throw new ArgumentNullException("downloader");

			foreach(AutoUpdateDownloader existingDownloader in base.InnerList)
				if (string.Compare(existingDownloader.Id, downloader.Id, true) == 0)
					return true;

			return false;
		}
        public void Remove(AutoUpdateDownloader downloader)
        {
            if (downloader == null)
            {
                throw new ArgumentNullException("downloader");
            }

            if (this.Contains(downloader))
            {
                base.InnerList.Remove(downloader);
            }
        }
        public void Add(AutoUpdateDownloader downloader)
        {
            if (downloader == null)
            {
                throw new ArgumentNullException("downloader");
            }

            if (this.Contains(downloader))
            {
                throw new AutoUpdateDownloaderAlreadyExistsException(downloader);
            }

            base.InnerList.Add(downloader);
        }
        public bool Contains(AutoUpdateDownloader downloader)
        {
            if (downloader == null)
            {
                throw new ArgumentNullException("downloader");
            }

            foreach (AutoUpdateDownloader existingDownloader in base.InnerList)
            {
                if (string.Compare(existingDownloader.Id, downloader.Id, true) == 0)
                {
                    return(true);
                }
            }

            return(false);
        }
		public AutoUpdateDownloaderAlreadyExistsException(AutoUpdateDownloader downloader) : base("A downloader with the same Id already exists.")		
		{
			_downloader = downloader;
		}
		/// <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;
 }
Пример #12
0
 /// <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;
 }
Пример #13
0
 /// <summary>
 /// Initializes a new instance of the AutoUpdateDownloadDescriptor class
 /// </summary>
 public AutoUpdateDownloadDescriptor()
 {
     _manifest   = new AutoUpdateManifest();
     _downloader = null;
     _options    = null;
 }