示例#1
0
 public Form1()
 {
     InitializeComponent();
     TcpChannel channel = new TcpChannel();
     ChannelServices.RegisterChannel(channel);
     client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject(typeof(IHelloRemotingService.IHelloRemotingService),
                                                                             "tcp://localhost:8080/GetMessage");
 }
        public Form1()
        {
            InitializeComponent();
            TcpChannel channel = new TcpChannel();

            ChannelServices.RegisterChannel(channel);

            client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject(typeof(IHelloRemotingService.IHelloRemotingService), "tcp://localhost:8080/GetMessage");
        }
        public MainWindow()
        {
            InitializeComponent();
            TcpChannel channel = new TcpChannel();

            client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject
                         (typeof(IHelloRemotingService.IHelloRemotingService),
                         "tcp://localhost:8090/GetMessage");
        }
示例#4
0
        private void RegisterClient()
        {
            TcpChannel channel = new TcpChannel();

#pragma warning disable CS0618 // Type or member is obsolete
            ChannelServices.RegisterChannel(channel);
#pragma warning restore CS0618 // Type or member is obsolete
            client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject(typeof(IHelloRemotingService.IHelloRemotingService), "tcp://localhost:45012/GetMessage");
            System.Diagnostics.Debug.Assert(client != null);
        }