Exemplo n.º 1
0
        public void Export(string fileName)
        {
            Rbac          rbac  = new DataManager.Manager(false).GetRbac(this.Name);
            RbacEngineWeb wRbac = new RbacEngineWeb(rbac);
            StreamWriter  sw    = new StreamWriter(fileName);
            var           s     = new System.Xml.Serialization.XmlSerializer(wRbac.GetType());

            s.Serialize(sw, wRbac);
            sw.Close();
        }
Exemplo n.º 2
0
        public static RbacEngineWeb Save(RbacEngineWeb rbacEngineWeb)
        {
            Rbac rbac = GetRbac(rbacEngineWeb.Name);

            rbac.Description          = rbacEngineWeb.Description;
            rbac.ConnectionString     = rbacEngineWeb.ConnectionString;
            rbac.MetaDataRbac         = rbacEngineWeb.MetaDataRbac;
            rbac.MetaDataEntitlements = rbacEngineWeb.MetaDataEntitlements;
            rbac = new DataManager.Manager().AddOrUpdate(rbac);
            return(rbacEngineWeb);
        }