// PolicyLevel m_level; protected CodeGroup (IMembershipCondition membershipCondition, PolicyStatement policy) { if (null == membershipCondition) throw new ArgumentNullException ("membershipCondition"); if (policy != null) m_policy = policy.Copy (); m_membershipCondition = membershipCondition.Copy (); }
/// <summary>Initializes a new instance of <see cref="T:System.Security.Policy.CodeGroup" />.</summary> /// <param name="membershipCondition">A membership condition that tests evidence to determine whether this code group applies policy. </param> /// <param name="policy">The policy statement for the code group in the form of a permission set and attributes to grant code that matches the membership condition. </param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="membershipCondition" /> parameter is null. </exception> /// <exception cref="T:System.ArgumentException">The type of the <paramref name="membershipCondition" /> parameter is not valid.-or- The type of the <paramref name="policy" /> parameter is not valid. </exception> protected CodeGroup(IMembershipCondition membershipCondition, PolicyStatement policy) { if (membershipCondition == null) { throw new ArgumentNullException("membershipCondition"); } if (policy != null) { this.m_policy = policy.Copy(); } this.m_membershipCondition = membershipCondition.Copy(); }
/// <summary>初始化 <see cref="T:System.Security.Policy.CodeGroup" /> 的新实例。</summary> /// <param name="membershipCondition">成员条件,它测试证据以确定此代码组是否应用策略。</param> /// <param name="policy">形式为权限集和特性的代码组的策略声明,这些权限集和特性将被授予匹配成员条件的代码。</param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="membershipCondition" /> 参数为 null。</exception> /// <exception cref="T:System.ArgumentException"> /// <paramref name="membershipCondition" /> 参数的类型无效。- 或 -<paramref name="policy" /> 参数的类型无效。</exception> protected CodeGroup(IMembershipCondition membershipCondition, PolicyStatement policy) { if (membershipCondition == null) { throw new ArgumentNullException("membershipCondition"); } this.m_policy = policy != null?policy.Copy() : (PolicyStatement)null; this.m_membershipCondition = membershipCondition.Copy(); this.m_children = (IList)ArrayList.Synchronized(new ArrayList()); this.m_element = (SecurityElement)null; this.m_parentLevel = (PolicyLevel)null; }
public CodeGroup(IMembershipCondition membershipCondition, PolicyStatement policy) #endif { if (null == membershipCondition) { throw new ArgumentNullException("membershipCondition"); } if (policy != null) { m_policy = policy.Copy(); } m_membershipCondition = membershipCondition.Copy(); }
protected CodeGroup( IMembershipCondition membershipCondition, PolicyStatement policy ) { if (membershipCondition == null) throw new ArgumentNullException( "membershipCondition" ); if (policy == null) m_policy = null; else m_policy = policy.Copy(); m_membershipCondition = membershipCondition.Copy(); m_children = ArrayList.Synchronized( new ArrayList() ); m_element = null; m_parentLevel = null; }
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; }