Esempio n. 1
0
 private void GetGenresWorker(object userState, AsyncOperation asyncOp)
 {
     Exception exception = null;
     IEnumerable<TmdbGenre> genres = null;
     try
     {
         genres = GetGenres();
     }
     catch (Exception ex)
     {
         exception = ex;
     }
     var args = new TmdbGenresCompletedEventArgs(genres, exception, false, userState);
     asyncOp.PostOperationCompleted(
         e => OnGetGenresCompleted((TmdbGenresCompletedEventArgs)e),
         args);
 }
Esempio n. 2
0
 protected virtual void OnGetGenresCompleted(TmdbGenresCompletedEventArgs e)
 {
     if (GetGenresCompleted != null)
         GetGenresCompleted(this, e);
 }