本文整理汇总了C#中System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownClientType方法的典型用法代码示例。如果您正苦于以下问题:C# RemotingConfiguration.RegisterWellKnownClientType方法的具体用法?C# RemotingConfiguration.RegisterWellKnownClientType怎么用?C# RemotingConfiguration.RegisterWellKnownClientType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了RemotingConfiguration.RegisterWellKnownClientType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//引入命名空间
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;
public class ClientClass {
public static void Main() {
开发者ID:.NET开发者,项目名称:System.Runtime.Remoting,代码行数:9,代码来源:RemotingConfiguration.RegisterWellKnownClientType
示例2: TcpChannel
ChannelServices.RegisterChannel(new TcpChannel());
RemotingConfiguration.RegisterWellKnownClientType(
typeof(HelloService),
"tcp://localhost:8082/HelloServiceApplication/MyUri"
);
HelloService service = new HelloService();
开发者ID:.NET开发者,项目名称:System.Runtime.Remoting,代码行数:8,代码来源:RemotingConfiguration.RegisterWellKnownClientType
示例3:
if(service == null) {
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
}
开发者ID:.NET开发者,项目名称:System.Runtime.Remoting,代码行数:15,代码来源:RemotingConfiguration.RegisterWellKnownClientType