コード例 #1
0
        public override void ProcessCommand()
        {
            try
            {
                CrossRef_AniDB_TraktV2Repository repCrossRef = new CrossRef_AniDB_TraktV2Repository();
                CrossRef_AniDB_TraktV2           xref        = repCrossRef.GetByID(CrossRef_AniDB_TraktID);
                if (xref == null)
                {
                    return;
                }

                Trakt_ShowRepository repShow = new Trakt_ShowRepository();
                Trakt_Show           tvShow  = repShow.GetByTraktSlug(xref.TraktID);
                if (tvShow == null)
                {
                    return;
                }

                AniDB_AnimeRepository repAnime = new AniDB_AnimeRepository();
                AniDB_Anime           anime    = repAnime.GetByAnimeID(xref.AnimeID);
                if (anime == null)
                {
                    return;
                }

                string showName = "";
                if (tvShow != null)
                {
                    showName = tvShow.Title;
                }

                AzureWebAPI.Send_CrossRefAniDBTrakt(xref, anime.MainTitle);
            }
            catch (Exception ex)
            {
                logger.ErrorException(
                    "Error processing CommandRequest_WebCacheSendXRefAniDBTrakt: {0}" + ex.ToString(), ex);
                return;
            }
        }
        public override void ProcessCommand()
        {
            try
            {
                CrossRef_AniDB_TraktV2 xref = RepoFactory.CrossRef_AniDB_TraktV2.GetByID(CrossRef_AniDB_TraktID);
                if (xref == null)
                {
                    return;
                }

                Trakt_Show tvShow = RepoFactory.Trakt_Show.GetByTraktSlug(xref.TraktID);
                if (tvShow == null)
                {
                    return;
                }

                SVR_AniDB_Anime anime = RepoFactory.AniDB_Anime.GetByAnimeID(xref.AnimeID);
                if (anime == null)
                {
                    return;
                }

                string showName = string.Empty;
                if (tvShow != null)
                {
                    showName = tvShow.Title;
                }

                AzureWebAPI.Send_CrossRefAniDBTrakt(xref, anime.MainTitle);
            }
            catch (Exception ex)
            {
                logger.Error(ex,
                             "Error processing CommandRequest_WebCacheSendXRefAniDBTrakt: {0}" + ex.ToString());
                return;
            }
        }