Skip to content

Commit

Permalink
proxy=null
Browse files Browse the repository at this point in the history
  • Loading branch information
yingDev committed Feb 21, 2016
1 parent b3168db commit 21acd14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WGestures.Common/Product/VersionChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Net;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using System.Diagnostics;

namespace WGestures.Common.Product
{
Expand All @@ -14,6 +15,7 @@ public VersionChecker(string url, int timeOutSeconds = 15)
{
_url = url;
_client = new TimeOutWebClient(){TimeOutSecs = timeOutSeconds};
_client.Proxy = null;
_client.Encoding = System.Text.Encoding.UTF8;

_client.DownloadStringCompleted += (sender, args) =>
Expand Down Expand Up @@ -89,7 +91,11 @@ protected virtual void OnErrorHappened(Exception e)

public void CheckAsync()
{
var now = DateTime.Now;
_client.DownloadStringAsync(new Uri(_url));
var then = DateTime.Now;

Debug.WriteLine("CheckAsync Time used: " + (then - now).TotalSeconds);
}

public void Cancel()
Expand Down

0 comments on commit 21acd14

Please sign in to comment.