Exemplo n.º 1
0
 public async Task GetSearchResults(string query, MoviesListVewModel moviesListVewModel)
 {
     _moviesList = moviesListVewModel;
     query       = query.Replace(' ', '+').ToLower();
     try
     {
         using (WebClient client = new WebClient())
         {
             var uri = new Uri(string.Format(url, query));
             client.DownloadStringCompleted += OnDownloadCompleted;
             client.DownloadStringAsync(uri);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
Exemplo n.º 2
0
 public MoviesListPage()
 {
     InitializeComponent();
     BindingContext = _viewModel = new MoviesListVewModel();
 }