public YahooSyndicationFeed(JToken node) : base(node) { if (node["category"] != null) { this._Category = (YahooSyndicationFeedCategories)StringEnum.Parse(typeof(YahooSyndicationFeedCategories), node["category"].Value <string>()); } if (node["adultContent"] != null) { this._AdultContent = (YahooSyndicationFeedAdultValues)StringEnum.Parse(typeof(YahooSyndicationFeedAdultValues), node["adultContent"].Value <string>()); } if (node["feedDescription"] != null) { this._FeedDescription = node["feedDescription"].Value <string>(); } if (node["feedLandingPage"] != null) { this._FeedLandingPage = node["feedLandingPage"].Value <string>(); } }
public YahooSyndicationFeed(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "category": this._Category = (YahooSyndicationFeedCategories)StringEnum.Parse(typeof(YahooSyndicationFeedCategories), propertyNode.InnerText); continue; case "adultContent": this._AdultContent = (YahooSyndicationFeedAdultValues)StringEnum.Parse(typeof(YahooSyndicationFeedAdultValues), propertyNode.InnerText); continue; case "feedDescription": this._FeedDescription = propertyNode.InnerText; continue; case "feedLandingPage": this._FeedLandingPage = propertyNode.InnerText; continue; } } }