Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CalcService.ICalculator proxy = new CalculatorClient("WSHttpBinding_ICalculator");
            for (int i = 0; i < 10; i++)
            {
                proxy.Accumulate(i);
            }

            // WSHttpBinding binding = new WSHttpBinding();

            //            EndpointAddress address = new EndpointAddress("http://localhost:9000");
            //
            //            ChannelFactory<ICalculator> factory = new ChannelFactory<ICalculator>(binding, address);
            //
            //            var proxy = factory.CreateChannel();
            //
            //            for (int i = 0; i < 10; i++)
            //            {
            //                proxy.Accumulate(i);
            //            }
        }