Пример #1
0
 public void TestMethod1()
 {
     //
     // TODO: Add test logic here
     //
     string url = "http://www.apsc.utoronto.ca/timetable/fall.html";
     using (var client = new TimeoutClient(10000))
     {
         try
         {
             string content = client.DownloadString(url);
             Console.WriteLine(content);
         }
         catch (WebException ex)
         {
             //Console.WriteLine("Retry: {0:D}, unable to fetch: {1:G}", retryCount, this.Url);
             Console.WriteLine(ex.ToString());
         }
     }
 }
Пример #2
0
        public void TestMethod1()
        {
            //
            // TODO: Add test logic here
            //
            string url = "http://www.apsc.utoronto.ca/timetable/fall.html";

            using (var client = new TimeoutClient(10000))
            {
                try
                {
                    string content = client.DownloadString(url);
                    Console.WriteLine(content);
                }
                catch (WebException ex)
                {
                    //Console.WriteLine("Retry: {0:D}, unable to fetch: {1:G}", retryCount, this.Url);
                    Console.WriteLine(ex.ToString());
                }
            }
        }