2016-03-17 48 views

回答

0

下面的代碼工作的1.1.0.32其中proxyUri將像http://myproxy.net:8080

var graphUri = new Uri(ConnectionConfig.GraphUri); 
var httpClientHandler = new HttpClientHandler(); 

httpClientHandler.Proxy = new WebProxy(ConnectionConfig.ProxyUri, true); 
httpClientHandler.UseProxy = true; 

var httpClient = new HttpClient(httpClientHandler); 
var httpClientWrapper = new HttpClientWrapper(ConnectionConfig.Username, ConnectionConfig.Password, httpClient); 
_graphClient = new GraphClient(graphUri, httpClientWrapper);