Esempio n. 1
0
        public static List <Raw_AniDB_SimilarAnime> ProcessSimilarAnime(XmlDocument docAnime, int animeID)
        {
            List <Raw_AniDB_SimilarAnime> rels = new List <Raw_AniDB_SimilarAnime>();

            XmlNodeList simItems = docAnime["anime"]?["similaranime"]?.GetElementsByTagName("anime");

            if (simItems == null)
            {
                return(rels);
            }
            foreach (XmlNode node in simItems)
            {
                try
                {
                    Raw_AniDB_SimilarAnime sim = new Raw_AniDB_SimilarAnime();
                    sim.ProcessFromHTTPResult(node, animeID);
                    rels.Add(sim);
                }
                catch (Exception ex)
                {
                    logger.Error(ex, "Error in AniDBHTTPHelper.ProcessSimilarAnime: {0}");
                }
            }

            return(rels);
        }
Esempio n. 2
0
        public static List <Raw_AniDB_SimilarAnime> ProcessSimilarAnime(XmlDocument docAnime, int animeID)
        {
            List <Raw_AniDB_SimilarAnime> rels = new List <Raw_AniDB_SimilarAnime>();

            try
            {
                if (docAnime["anime"]["similaranime"] != null)
                {
                    XmlNodeList simItems = docAnime["anime"]["similaranime"].GetElementsByTagName("anime");
                    if (simItems != null)
                    {
                        foreach (XmlNode node in simItems)
                        {
                            try
                            {
                                Raw_AniDB_SimilarAnime sim = new Raw_AniDB_SimilarAnime();
                                sim.ProcessFromHTTPResult(node, animeID);
                                rels.Add(sim);
                            }
                            catch (Exception ex)
                            {
                                //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                logger.ErrorException("Error in AniDBHTTPHelper.ProcessSimilarAnime: {0}", ex);
                return(null);
            }

            return(rels);
        }
Esempio n. 3
0
		public static List<Raw_AniDB_SimilarAnime> ProcessSimilarAnime(XmlDocument docAnime, int animeID)
		{
			List<Raw_AniDB_SimilarAnime> rels = new List<Raw_AniDB_SimilarAnime>();

			try
			{
				if (docAnime["anime"]["similaranime"] != null)
				{
					XmlNodeList simItems = docAnime["anime"]["similaranime"].GetElementsByTagName("anime");
					if (simItems != null)
					{
						foreach (XmlNode node in simItems)
						{
							try
							{
								Raw_AniDB_SimilarAnime sim = new Raw_AniDB_SimilarAnime();
								sim.ProcessFromHTTPResult(node, animeID);
								rels.Add(sim);
							}
							catch (Exception ex)
							{
								//BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex);
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				logger.ErrorException("Error in AniDBHTTPHelper.ProcessSimilarAnime: {0}", ex);
				return null;
			}

			return rels;
		}