public static List <Raw_AniDB_RelatedAnime> ProcessRelations(XmlDocument docAnime, int animeID) { List <Raw_AniDB_RelatedAnime> rels = new List <Raw_AniDB_RelatedAnime>(); XmlNodeList relItems = docAnime?["anime"]?["relatedanime"]?.GetElementsByTagName("anime"); if (relItems == null) { return(rels); } foreach (XmlNode node in relItems) { try { Raw_AniDB_RelatedAnime rel = new Raw_AniDB_RelatedAnime(); rel.ProcessFromHTTPResult(node, animeID); rels.Add(rel); } catch (Exception ex) { logger.Error(ex, "Error in AniDBHTTPHelper.ProcessRelations: {0}"); } } return(rels); }
public static List <Raw_AniDB_RelatedAnime> ProcessRelations(XmlDocument docAnime, int animeID) { List <Raw_AniDB_RelatedAnime> rels = new List <Raw_AniDB_RelatedAnime>(); try { if (docAnime["anime"]["relatedanime"] != null) { XmlNodeList relItems = docAnime["anime"]["relatedanime"].GetElementsByTagName("anime"); if (relItems != null) { foreach (XmlNode node in relItems) { try { Raw_AniDB_RelatedAnime rel = new Raw_AniDB_RelatedAnime(); rel.ProcessFromHTTPResult(node, animeID); rels.Add(rel); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { logger.ErrorException("Error in AniDBHTTPHelper.ProcessRelations: {0}", ex); return(null); } return(rels); }
public static List<Raw_AniDB_RelatedAnime> ProcessRelations(XmlDocument docAnime, int animeID) { List<Raw_AniDB_RelatedAnime> rels = new List<Raw_AniDB_RelatedAnime>(); try { if (docAnime["anime"]["relatedanime"] != null) { XmlNodeList relItems = docAnime["anime"]["relatedanime"].GetElementsByTagName("anime"); if (relItems != null) { foreach (XmlNode node in relItems) { try { Raw_AniDB_RelatedAnime rel = new Raw_AniDB_RelatedAnime(); rel.ProcessFromHTTPResult(node, animeID); rels.Add(rel); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { logger.ErrorException("Error in AniDBHTTPHelper.ProcessRelations: {0}", ex); return null; } return rels; }