Exemple #1
0
 public ApiParameterPermissionItem(JToken node) : base(node)
 {
     if (node["object"] != null)
     {
         this._Object = node["object"].Value <string>();
     }
     if (node["parameter"] != null)
     {
         this._Parameter = node["parameter"].Value <string>();
     }
     if (node["action"] != null)
     {
         this._Action = (ApiParameterPermissionItemAction)StringEnum.Parse(typeof(ApiParameterPermissionItemAction), node["action"].Value <string>());
     }
 }
Exemple #2
0
        public ApiParameterPermissionItem(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "object":
                    this._Object = propertyNode.InnerText;
                    continue;

                case "parameter":
                    this._Parameter = propertyNode.InnerText;
                    continue;

                case "action":
                    this._Action = (ApiParameterPermissionItemAction)StringEnum.Parse(typeof(ApiParameterPermissionItemAction), propertyNode.InnerText);
                    continue;
                }
            }
        }