本文整理汇总了C#中Proxy.Request方法的典型用法代码示例。如果您正苦于以下问题:C# Proxy.Request方法的具体用法?C# Proxy.Request怎么用?C# Proxy.Request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Proxy
的用法示例。
在下文中一共展示了Proxy.Request方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnitTest
//
void UnitTest () {
// 產生Proxy
Proxy theProxy = new Proxy();
// 透過Proxy存取
theProxy.Request();
theProxy.ConnectRemote = true;
theProxy.Request();
}
示例2: Main
public void Main()
{
Console.WriteLine("Proxy Pattern\n");
ISubject subject = new Proxy();
Console.WriteLine(subject.Request());
Console.WriteLine(subject.Request());
subject = new Proxy();
Console.WriteLine(subject.Request());
Console.WriteLine((subject as ProtectionProxy).Authenticate("Secret"));
Console.WriteLine((subject as ProtectionProxy).Authenticate("Abracadabra"));
Console.WriteLine(subject.Request());
}
示例3: Main
public static void Main( string[] args )
{
// Create proxy and request a service
Proxy p = new Proxy();
p.Request();
}
示例4: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Proxy proxy = new Proxy();
proxy.Request();
}
示例5: Main
public static void Main()
{
// Create proxy and request a service
Proxy proxy = new Proxy();
proxy.Request();
// Wait for user
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}