コード例 #1
0
 protected virtual void OnMovieSearchByImdbCompleted(TmdbMovieSearchCompletedEventArgs e)
 {
     if (MovieSearchByImdbCompleted != null)
     {
         MovieSearchByImdbCompleted(this, e);
     }
 }
コード例 #2
0
        private void MovieSearchByImdbWorker(string imdbId, object userState, AsyncOperation asyncOp)
        {
            Exception exception            = null;
            IEnumerable <TmdbMovie> movies = null;

            try
            {
                movies = MovieSearchByImdb(imdbId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }
            var args = new TmdbMovieSearchCompletedEventArgs(movies, exception, false, userState);

            asyncOp.PostOperationCompleted(
                e => OnMovieSearchByImdbCompleted((TmdbMovieSearchCompletedEventArgs)e),
                args);
        }
コード例 #3
0
        private void MovieBrowseWorker(TmdbOrderBy orderBy, TmdbOrder order, int perPage = 0, int page = 0, string query = ""
                                       , int minVotes      = 0, float ratingMin        = 0, float ratingMax = 0, IEnumerable <int> genres = null, GenresSelector?genresSelector = null,
                                       DateTime?releaseMin = null, DateTime?releaseMax = null, int year     = 0, IEnumerable <string> certifications = null
                                       , IEnumerable <string> companies = null, IEnumerable <string> countries = null, object userState = null, AsyncOperation asyncOp = null)
        {
            Exception exception            = null;
            IEnumerable <TmdbMovie> movies = null;

            try
            {
                movies = MovieBrowse(orderBy, order, perPage, page, query, minVotes, ratingMin, ratingMax, genres, genresSelector, releaseMin, releaseMax, year, certifications, companies, countries);
            }
            catch (Exception ex)
            {
                exception = ex;
            }
            var args = new TmdbMovieSearchCompletedEventArgs(movies, exception, false, userState);

            asyncOp.PostOperationCompleted(
                e => OnMovieBrowseCompleted((TmdbMovieSearchCompletedEventArgs)e),
                args);
        }
コード例 #4
0
ファイル: TmdbApi.cs プロジェクト: revenz/iMeta
 private void MovieSearchWorker(string title, object userState, AsyncOperation asyncOp)
 {
     Exception exception = null;
     IEnumerable<TmdbMovie> movies = null;
     try
     {
         movies = MovieSearch(title);
     }
     catch (Exception ex)
     {
         exception = ex;
     }
     var args = new TmdbMovieSearchCompletedEventArgs(movies, exception, false, userState);
     asyncOp.PostOperationCompleted(
         e => OnMovieSearchCompleted((TmdbMovieSearchCompletedEventArgs) e),
         args);
 }
コード例 #5
0
ファイル: TmdbApi.cs プロジェクト: revenz/iMeta
 private void MovieBrowseWorker(TmdbOrderBy orderBy, TmdbOrder order, int perPage = 0, int page = 0, string query = ""
     , int minVotes = 0, float ratingMin = 0, float ratingMax = 0, IEnumerable<int> genres = null, GenresSelector? genresSelector = null,
     DateTime? releaseMin = null, DateTime? releaseMax = null, int year = 0, IEnumerable<string> certifications = null
     , IEnumerable<string> companies = null, IEnumerable<string> countries = null, object userState = null, AsyncOperation asyncOp = null)
 {
     Exception exception = null;
     IEnumerable<TmdbMovie> movies = null;
     try
     {
         movies = MovieBrowse(orderBy, order, perPage, page, query, minVotes, ratingMin, ratingMax, genres, genresSelector, releaseMin, releaseMax, year, certifications, companies, countries);
     }
     catch (Exception ex)
     {
         exception = ex;
     }
     var args = new TmdbMovieSearchCompletedEventArgs(movies, exception, false, userState);
     asyncOp.PostOperationCompleted(
         e => OnMovieBrowseCompleted((TmdbMovieSearchCompletedEventArgs)e),
         args);
 }
コード例 #6
0
ファイル: TmdbApi.cs プロジェクト: revenz/iMeta
 protected virtual void OnMovieSearchCompleted(TmdbMovieSearchCompletedEventArgs e)
 {
     if (MovieSearchCompleted != null)
         MovieSearchCompleted(this, e);
 }