public UserAgentRestriction(JToken node) : base(node) { if (node["userAgentRestrictionType"] != null) { this._UserAgentRestrictionType = (UserAgentRestrictionType)ParseEnum(typeof(UserAgentRestrictionType), node["userAgentRestrictionType"].Value <string>()); } if (node["userAgentRegexList"] != null) { this._UserAgentRegexList = node["userAgentRegexList"].Value <string>(); } }
public UserAgentRestriction(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "userAgentRestrictionType": this._UserAgentRestrictionType = (UserAgentRestrictionType)ParseEnum(typeof(UserAgentRestrictionType), propertyNode.InnerText); continue; case "userAgentRegexList": this._UserAgentRegexList = propertyNode.InnerText; continue; } } }