示例#1
0
        public void Connect()
        {
            var binding = new NetTcpBinding();
            ChannelFactory <IHealthMonitoring> factory = new ChannelFactory <IHealthMonitoring>(binding, new EndpointAddress("net.tcp://localhost:6000/HealthMonitoring"));

            proxy = factory.CreateChannel();
            //dalje se koristi proxy.IAmAlive() u RunAsync metodi
        }
示例#2
0
        public void Connect()
        {
            ChannelFactory<IHealthMonitoring> factory = new ChannelFactory<IHealthMonitoring>(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:11000/HealthMonitoring"));

            proxy = factory.CreateChannel();

            Console.WriteLine("Connected.");
        }