Пример #1
0
        static void CallProxy(IClaimsService proxy)
        {
            var proxyChannel = proxy as IClientChannel;

            if (proxy != null)
            {
                proxyChannel.Open();
            }

            try
            {
                proxy.ShowClaims();
                proxy.DoSecret();
                proxy.DoTopSecret();

                ((IClientChannel)proxy).Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }
        static void CallProxy(IClaimsService proxy)
        {
            var proxyChannel = proxy as IClientChannel;
            if (proxy != null)
            {
                proxyChannel.Open();
            }

            try
            {
                proxy.ShowClaims();
                proxy.DoSecret();
                proxy.DoTopSecret();

                ((IClientChannel)proxy).Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }