protected virtual void OnGetGenresCompleted(TmdbGenresCompletedEventArgs e) { if (GetGenresCompleted != null) { GetGenresCompleted(this, e); } }
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); }