Exemple #1
0
        public void MoveCustomersToBankingEntity(Guid[] customerIds, BankingEntity bankingEntity)
        {
            var client = new PublicServiceChannel();

            try
            {
                client.MoveCustomersToBankingEntity(customerIds, bankingEntity);
                client.Close();
            }
            catch (CommunicationException)
            {
                client.Abort();
                throw;
            }
            catch (TimeoutException)
            {
                client.Abort();
                throw;
            }
            catch (Exception)
            {
                client.Abort();
                throw;
            }
        }
Exemple #2
0
        public Customer[] ListCustomers()
        {
            var client    = new PublicServiceChannel();
            var customers = new Customer[] { };

            try
            {
                customers = client.ListCustomers();
                client.Close();
            }
            catch (CommunicationException)
            {
                client.Abort();
                throw;
            }
            catch (TimeoutException)
            {
                client.Abort();
                throw;
            }
            catch (Exception)
            {
                client.Abort();
                throw;
            }

            return(customers);
        }