Example #1
0
        public RetrieveUserPrivilegesResponse(XmlNode response)
        {
            XmlNode results = XmlHelper.SelectSingleNode(response, "Results");

            foreach (XmlNode nameValuePair in results.ChildNodes)
            {
                XmlNode key = XmlHelper.SelectSingleNode(nameValuePair, "key");
                if (XmlHelper.GetNodeTextValue(key) == "RolePrivileges")
                {
                    XmlNode value = XmlHelper.SelectSingleNode(nameValuePair, "value");
                    this.RolePrivileges = new List <RolePrivilege>();

                    foreach (XmlNode privNode in value.ChildNodes)
                    {
                        RolePrivilege priv = new RolePrivilege();
                        priv.PrivilegeId = new Guid(XmlHelper.SelectSingleNodeValue(privNode, "PrivilegeId"));
                        ArrayEx.Add(RolePrivileges, priv);
                    }
                }
            }
        }
        public RetrieveUserPrivilegesResponse(XmlNode response)
        {
            
            XmlNode results = XmlHelper.SelectSingleNode(response, "Results");

            foreach (XmlNode nameValuePair in results.ChildNodes)
            {
                XmlNode key = XmlHelper.SelectSingleNode(nameValuePair, "key");
                if (XmlHelper.GetNodeTextValue(key) == "RolePrivileges")
                {
                    XmlNode value = XmlHelper.SelectSingleNode(nameValuePair, "value");
                    this.RolePrivileges = new List<RolePrivilege>();
                    
                    foreach (XmlNode privNode in value.ChildNodes)
                    {
                        RolePrivilege priv = new RolePrivilege();
                        priv.PrivilegeId = new Guid(XmlHelper.SelectSingleNodeValue(privNode, "PrivilegeId"));
                        ArrayEx.Add(RolePrivileges,priv);
                    }
                }
            }
        }