Ejemplo n.º 1
0
        public List <Lista> CercaLista(string nome)
        {
            List <Lista> liste = null;

            try
            {
                BasicHttpBinding myBinding = new BasicHttpBinding();
                myBinding.MaxReceivedMessageSize = 2147483647;
                myBinding.MaxBufferSize          = 2147483647;
                EndpointAddress          myEndpoint       = new EndpointAddress(_addr);
                ChannelFactory <IUtente> myChannelFactory = new ChannelFactory <IUtente>(myBinding, myEndpoint);
                // Create a channel.
                IUtente client = myChannelFactory.CreateChannel();
                liste = client.CercaLista(nome).ToList <Lista>();
                ((IClientChannel)client).Close();
            }
            catch (Exception)
            {
                //doNothing
            }
            return(liste);
        }