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