protected virtual void GetMovieListEvent(GetMovieList e) { EventHandler <GetMovieList> handler = getMovies; if (handler != null) { handler(this, e); } }
async void MovieDataAsync(String url) { HttpClient client = new HttpClient(); Task <string> getStringTask = client.GetStringAsync(url); string urlContents = await getStringTask; GetMovieList data_to_send = new GetMovieList(); data_to_send.data = urlContents; GetMovieListEvent(data_to_send); }