我覺得這是做它的代碼。
它在XmlDownloadManager類,這是內部
private Stream GetNonFileStream(Uri uri, ICredentials credentials)
{
WebRequest request = WebRequest.Create(uri);
if (credentials != null)
{
request.Credentials = credentials;
}
WebResponse response = request.GetResponse();
HttpWebRequest request2 = request as HttpWebRequest;
if (request2 != null)
{
lock (this)
{
if (this.connections == null)
{
this.connections = new Hashtable();
}
OpenedHost host = (OpenedHost) this.connections[request2.Address.Host];
if (host == null)
{
host = new OpenedHost();
}
if (host.nonCachedConnectionsCount < (request2.ServicePoint.ConnectionLimit - 1))
{
if (host.nonCachedConnectionsCount == 0)
{
this.connections.Add(request2.Address.Host, host);
}
host.nonCachedConnectionsCount++;
return new XmlRegisteredNonCachedStream(response.GetResponseStream(), this, request2.Address.Host);
}
return new XmlCachedStream(response.ResponseUri, response.GetResponseStream());
}
}
return response.GetResponseStream();
}
您可以使用.NET反射看到自己http://www.red-gate.com/products/dotnet-development/reflector/ – Vadim 2010-12-18 05:34:24
@我必須下載這個,它不允許在我的辦公室筆記本電腦上使用,你能告訴我,如果你知道的話 – kobe 2010-12-18 05:37:19