C# 是否将System.Net.WebProxy与WUApiLib IUpdateSession.WebProxy一起使用?

C# 是否将System.Net.WebProxy与WUApiLib IUpdateSession.WebProxy一起使用?,c#,windows,C#,Windows,我很难在WUApiLib.WebProxy/IUpdateSession.WebProxy中使用我的代理设置 我尝试了以下方法,但没有成功: IUpdateSession session = new UpdateSession(); session.WebProxy.AutoDetect(); //Error: Method, Delegate or Event is expected. 然后我尝试了以下方法: private delegate IUpdateSession D();

我很难在
WUApiLib.WebProxy
/
IUpdateSession.WebProxy
中使用我的代理设置

我尝试了以下方法,但没有成功:

IUpdateSession session = new UpdateSession();

session.WebProxy.AutoDetect(); //Error: Method, Delegate or Event is expected.
然后我尝试了以下方法:

 private delegate IUpdateSession D();

 IUpdateSession session = new UpdateSession();
 D proxy = new D(session.WebProxy.AutoDetect()); //Same error...
最后尝试简单地添加地址:

  IUpdateSession session = new UpdateSession();
  session.WebProxy.Address = "http://198.13.44.1:8080"; //This  seems to run, but i'm not sure how i can tell for certain if its working good.

是否可以将
System.Net.WebProxy
的实例传递到
WUApiLib的
IUpdateSession
中找到的
WebProxy

IUpdateSession使用IWebProxy属性的IWebProxy接口


该属性是一个布尔属性,因此您应该将其设置为true或false,而不是像方法一样调用它。

为此,我已经很久没有接触该代码库了,但这仍然是一个好消息。