public CountryRestriction(JToken node) : base(node) { if (node["countryRestrictionType"] != null) { this._CountryRestrictionType = (CountryRestrictionType)ParseEnum(typeof(CountryRestrictionType), node["countryRestrictionType"].Value <string>()); } if (node["countryList"] != null) { this._CountryList = node["countryList"].Value <string>(); } }
public CountryRestriction(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "countryRestrictionType": this._CountryRestrictionType = (CountryRestrictionType)ParseEnum(typeof(CountryRestrictionType), propertyNode.InnerText); continue; case "countryList": this._CountryList = propertyNode.InnerText; continue; } } }