示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var endpoint = new EndpointAddress("http://localhost:5555/MathService");

            channel = ChannelFactory <IMathServiceLibrary> .CreateChannel(new BasicHttpBinding(), endpoint);

            var endpoint2 = new EndpointAddress("http://localhost:8081/CalcService");

            channel2 = ChannelFactory <ICalcService> .CreateChannel(new BasicHttpBinding(), endpoint2);
        }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var endpoint = new EndpointAddress("net.tcp://localhost:6666/MathService");

            channell = ChannelFactory <IMathServiceLibrary> .CreateChannel(new NetTcpBinding(), endpoint);
        }