Exemplo n.º 1
0
 internal CodeGroup(IMembershipCondition membershipCondition, PermissionSet permSet)
 {
     this.m_membershipCondition = membershipCondition;
     this.m_policy = new System.Security.Policy.PolicyStatement();
     this.m_policy.SetPermissionSetNoCopy(permSet);
     this.m_children    = ArrayList.Synchronized(new ArrayList());
     this.m_element     = null;
     this.m_parentLevel = null;
 }
 internal CodeGroup(IMembershipCondition membershipCondition, PermissionSet permSet)
 {
     this.m_membershipCondition = membershipCondition;
     this.m_policy = new System.Security.Policy.PolicyStatement();
     this.m_policy.SetPermissionSetNoCopy(permSet);
     this.m_children = ArrayList.Synchronized(new ArrayList());
     this.m_element = null;
     this.m_parentLevel = null;
 }
Exemplo n.º 3
0
 public void FromXml(SecurityElement e, PolicyLevel level)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     lock (this)
     {
         this.m_element             = e;
         this.m_parentLevel         = level;
         this.m_children            = null;
         this.m_membershipCondition = null;
         this.m_policy      = null;
         this.m_name        = e.Attribute("Name");
         this.m_description = e.Attribute("Description");
         this.ParseXml(e, level);
     }
 }
 protected CodeGroup(IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy)
 {
     if (membershipCondition == null)
     {
         throw new ArgumentNullException("membershipCondition");
     }
     if (policy == null)
     {
         this.m_policy = null;
     }
     else
     {
         this.m_policy = policy.Copy();
     }
     this.m_membershipCondition = membershipCondition.Copy();
     this.m_children = ArrayList.Synchronized(new ArrayList());
     this.m_element = null;
     this.m_parentLevel = null;
 }
Exemplo n.º 5
0
 protected CodeGroup(IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy)
 {
     if (membershipCondition == null)
     {
         throw new ArgumentNullException("membershipCondition");
     }
     if (policy == null)
     {
         this.m_policy = null;
     }
     else
     {
         this.m_policy = policy.Copy();
     }
     this.m_membershipCondition = membershipCondition.Copy();
     this.m_children            = ArrayList.Synchronized(new ArrayList());
     this.m_element             = null;
     this.m_parentLevel         = null;
 }
Exemplo n.º 6
0
 public UnionCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy) : base(default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement))
 {
 }
 private void ParsePolicy()
 {
     System.Security.Policy.PolicyStatement statement;
 Label_0000:
     statement = new System.Security.Policy.PolicyStatement();
     bool flag = false;
     SecurityElement et = new SecurityElement("PolicyStatement");
     et.AddAttribute("version", "1");
     SecurityElement element = this.m_element;
     lock (this)
     {
         if (this.m_element != null)
         {
             string str = this.m_element.Attribute("PermissionSetName");
             if (str != null)
             {
                 et.AddAttribute("PermissionSetName", str);
                 flag = true;
             }
             else
             {
                 SecurityElement child = this.m_element.SearchForChildByTag("PermissionSet");
                 if (child != null)
                 {
                     et.AddChild(child);
                     flag = true;
                 }
                 else
                 {
                     et.AddChild(new PermissionSet(false).ToXml());
                     flag = true;
                 }
             }
             string str2 = this.m_element.Attribute("Attributes");
             if (str2 != null)
             {
                 et.AddAttribute("Attributes", str2);
                 flag = true;
             }
         }
     }
     if (flag)
     {
         statement.FromXml(et, this.m_parentLevel);
     }
     else
     {
         statement.PermissionSet = null;
     }
     lock (this)
     {
         if ((element == this.m_element) && (this.m_policy == null))
         {
             this.m_policy = statement;
         }
         else if (this.m_policy == null)
         {
             goto Label_0000;
         }
     }
     if ((this.m_policy != null) && (this.m_children != null))
     {
         IMembershipCondition membershipCondition = this.m_membershipCondition;
     }
 }
 public void FromXml(SecurityElement e, PolicyLevel level)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     lock (this)
     {
         this.m_element = e;
         this.m_parentLevel = level;
         this.m_children = null;
         this.m_membershipCondition = null;
         this.m_policy = null;
         this.m_name = e.Attribute("Name");
         this.m_description = e.Attribute("Description");
         this.ParseXml(e, level);
     }
 }
Exemplo n.º 9
0
        private void ParsePolicy()
        {
            System.Security.Policy.PolicyStatement statement;
Label_0000:
            statement = new System.Security.Policy.PolicyStatement();
            bool            flag = false;
            SecurityElement et   = new SecurityElement("PolicyStatement");

            et.AddAttribute("version", "1");
            SecurityElement element = this.m_element;

            lock (this)
            {
                if (this.m_element != null)
                {
                    string str = this.m_element.Attribute("PermissionSetName");
                    if (str != null)
                    {
                        et.AddAttribute("PermissionSetName", str);
                        flag = true;
                    }
                    else
                    {
                        SecurityElement child = this.m_element.SearchForChildByTag("PermissionSet");
                        if (child != null)
                        {
                            et.AddChild(child);
                            flag = true;
                        }
                        else
                        {
                            et.AddChild(new PermissionSet(false).ToXml());
                            flag = true;
                        }
                    }
                    string str2 = this.m_element.Attribute("Attributes");
                    if (str2 != null)
                    {
                        et.AddAttribute("Attributes", str2);
                        flag = true;
                    }
                }
            }
            if (flag)
            {
                statement.FromXml(et, this.m_parentLevel);
            }
            else
            {
                statement.PermissionSet = null;
            }
            lock (this)
            {
                if ((element == this.m_element) && (this.m_policy == null))
                {
                    this.m_policy = statement;
                }
                else if (this.m_policy == null)
                {
                    goto Label_0000;
                }
            }
            if ((this.m_policy != null) && (this.m_children != null))
            {
                IMembershipCondition membershipCondition = this.m_membershipCondition;
            }
        }
Exemplo n.º 10
0
 protected CodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy)
 {
 }