/// <summary> /// Returns whether the specified download information already exists within the collection or not. /// </summary> /// <param name="info">Development.Materia.Net.DownloadFileInfo to evaluate.</param> /// <returns>True if value exists within the collection otherwise false.</returns> public bool Contains(DownloadFileInfo info) { return List.Contains(info); }
/// <summary> /// Removes the specified download file information from the collection. /// </summary> /// <param name="info">Development.Materia.Net.DownloadFileInfo to remove from the collection.</param> public void Remove(DownloadFileInfo info) { if (Contains(info)) List.Remove(info); }
/// <summary> /// Adds a new download file information into the collection. /// </summary> /// <param name="path">Http or Ftp download path</param> /// <param name="credential">Server authentication credentials</param> /// <param name="deletfileafterdownload">Determines whether to delete download file from the server after successful download process</param> /// <returns>Development.Materia.Net.DownloadFileInfo object that has been added.</returns> public DownloadFileInfo Add(string path, NetworkCredential credential, bool deletfileafterdownload) { DownloadFileInfo _info = new DownloadFileInfo(path, credential, deletfileafterdownload); int _index = List.Add(_info); return (DownloadFileInfo)List[_index]; }