static void Main(string[] args) { MovieGrabber mg = new MovieGrabber(); mg.moviesToGet.Add("tt0119654"); mg.moviesToGet.Add("tt0936501"); mg.moviesToGet.Add("tt3832914"); mg.moviesToGet.Add("tt4046784"); mg.moviesToGet.Add("tt2403021"); mg.moviesToGet.Add("tt2510894"); mg.moviesToGet.Add("tt2361509"); mg.moviesToGet.Add("tt3018070"); mg.moviesToGet.Add("ttqqqqqqq"); Console.WriteLine("Starting movie Info Retrieval"); Console.WriteLine(); List <MovieInfo> MovieInfoList = mg.CreateMultipleTasksAsync().Result; Console.WriteLine("Finished Movie Retrieval"); Console.WriteLine(".....Printing Results....."); Console.WriteLine(); Console.WriteLine(); foreach (var movie in MovieInfoList) { Console.WriteLine(movie.Title); Console.WriteLine(movie.Year); Console.WriteLine(movie.Rated); Console.WriteLine(movie.Released); Console.WriteLine(movie.Runtime); Console.WriteLine(movie.Genre); Console.WriteLine(movie.Director); Console.WriteLine(movie.Writer); Console.WriteLine(movie.Actors); Console.WriteLine(movie.Plot); Console.WriteLine(movie.Language); Console.WriteLine(movie.Country); Console.WriteLine(movie.Awards); Console.WriteLine(movie.Poster); Console.WriteLine(movie.Metascore); Console.WriteLine(movie.imdbRating); Console.WriteLine(movie.imdbVotes); Console.WriteLine(movie.imdbID); Console.WriteLine(movie.Type); Console.WriteLine(movie.Response); Console.WriteLine(); } Console.ReadKey(); }
static void Main(string[] args) { MovieGrabber mg = new MovieGrabber(); mg.moviesToGet.Add("tt0119654"); mg.moviesToGet.Add("tt0936501"); mg.moviesToGet.Add("tt3832914"); mg.moviesToGet.Add("tt4046784"); mg.moviesToGet.Add("tt2403021"); mg.moviesToGet.Add("tt2510894"); mg.moviesToGet.Add("tt2361509"); mg.moviesToGet.Add("tt3018070"); mg.moviesToGet.Add("ttqqqqqqq"); Console.WriteLine("Starting movie Info Retrieval"); Console.WriteLine(); List<MovieInfo> MovieInfoList = mg.CreateMultipleTasksAsync().Result; Console.WriteLine("Finished Movie Retrieval"); Console.WriteLine(".....Printing Results....."); Console.WriteLine(); Console.WriteLine(); foreach (var movie in MovieInfoList) { Console.WriteLine(movie.Title); Console.WriteLine(movie.Year); Console.WriteLine(movie.Rated); Console.WriteLine(movie.Released); Console.WriteLine(movie.Runtime); Console.WriteLine(movie.Genre); Console.WriteLine(movie.Director); Console.WriteLine(movie.Writer); Console.WriteLine(movie.Actors); Console.WriteLine(movie.Plot); Console.WriteLine(movie.Language); Console.WriteLine(movie.Country); Console.WriteLine(movie.Awards); Console.WriteLine(movie.Poster); Console.WriteLine(movie.Metascore); Console.WriteLine(movie.imdbRating); Console.WriteLine(movie.imdbVotes); Console.WriteLine(movie.imdbID); Console.WriteLine(movie.Type); Console.WriteLine(movie.Response); Console.WriteLine(); } Console.ReadKey(); }