/// <summary> /// Downloads a file from the web to the specified path. /// </summary> /// <param name="uri"></param> /// <param name="path"></param> public static void DownloadWebFile(Uri uri, string path) { using (WebClient wc = new GZipWebClient()) { wc.DownloadFile(uri, path); } }
/// <summary> /// Opens a read only stream to the given web Uri. /// </summary> /// <param name="uri"></param> /// <returns></returns> public static ReadOnlyStream OpenWebStream(Uri uri) { using (GZipWebClient client = new GZipWebClient()) { return(new ReadOnlyStream(client.OpenRead(uri))); } }