Esempio n. 1
0
        private TmdbMovie GetMovieById(int id)
        {
            ChannelFactory <ITmdbSearchService> factory = new ChannelFactory <ITmdbSearchService>("");
            ITmdbSearchService proxy = factory.CreateChannel();

            TmdbMovie movieToReturn = proxy.SearchForMovieById(id);

            factory.Close();
            return(movieToReturn);
        }
        public void SearchById()
        {
            ChannelFactory <ITmdbSearchService> factory = new ChannelFactory <ITmdbSearchService>("");
            ITmdbSearchService proxy = factory.CreateChannel();

            try
            {
                MovieById     = proxy.SearchForMovieById(SearchId);
                SelectedMovie = MovieById;
                MoviesByTitle = null;
            }
            catch (FaultException)
            {
            }
            catch (Exception)
            {
            }

            factory.Close();
        }