예제 #1
0
 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>();
     }
 }
예제 #2
0
        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;
                }
            }
        }