Пример #1
0
        static void Main(string[] args)
        {
            Console.Title = "Client";

            var client1 = new Service1Client();
            var client2 = new Service2Client();
            while (true)
            {
                var input = Console.ReadLine();
                var i = 0;
                int.TryParse(input, out i);
                var result1 = client1.GetData(i);
                var result2 = client2.GetData(i);
                Console.WriteLine(result1);
                Console.WriteLine(result2);

            }
        }
Пример #2
0
        public ActionResult GetData()
        {
            LogInfo        logInfo;
            Service2Client svcClient = null;

            try
            {
                using (svcClient = new Service2Client())
                {
                    logInfo = svcClient.GetData(new Contracts.LogInfo());
                }
            }
            finally
            {
                svcClient.SafeCloseExtension();
            }

            return(View("Index", logInfo));
        }