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); }
public void Populate(Raw_AniDB_SimilarAnime rawSim) { this.AnimeID = rawSim.AnimeID; this.Approval = rawSim.Approval; this.Total = rawSim.Total; this.SimilarAnimeID = rawSim.SimilarAnimeID; }
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); }
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; }