public static DownloadTask Create(DownloadInfo dif) { if (dif == null) { throw new ArgumentNullException("dif"); } DownloadTask dt = null; if (dif.RemoteUri.Scheme == Uri.UriSchemeHttp || dif.RemoteUri.Scheme == Uri.UriSchemeHttps) { dt = new HttpDownloadTask(dif); } else { throw new NotSupportedException(Catalog.GetString("Uri scheme not supported")); } return(dt); }
public static DownloadTask Create(DownloadInfo dif) { if (dif == null) { throw new ArgumentNullException ("dif"); } DownloadTask dt = null; if (dif.RemoteUri.Scheme == Uri.UriSchemeHttp || dif.RemoteUri.Scheme == Uri.UriSchemeHttps) { dt = new HttpDownloadTask (dif); } else { throw new NotSupportedException (Catalog.GetString("Uri scheme not supported")); } return dt; }