Exemplo n.º 1
0
        public List <Lista> getListe(string usernameUtente)
        {
            List <Lista> recensioni = 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();
                recensioni = client.CercaListaUtente(usernameUtente).ToList <Lista>();
                ((IClientChannel)client).Close();
            }
            catch (Exception)
            {
                //doNothing
            }
            return(recensioni);
        }