private void AddAccessEntryAndIntersect(KeyContainerPermissionAccessEntry accessEntry, KeyContainerPermission target)
        {
            KeyContainerPermissionAccessEntry accessEntry1 = new KeyContainerPermissionAccessEntry(accessEntry);

            accessEntry1.Flags &= KeyContainerPermission.GetApplicableFlags(accessEntry, target);
            this.AccessEntries.Add(accessEntry1);
        }
        // Token: 0x060026CD RID: 9933 RVA: 0x0008CBA8 File Offset: 0x0008ADA8
        private void AddAccessEntryAndUnion(KeyContainerPermissionAccessEntry accessEntry, KeyContainerPermission target)
        {
            KeyContainerPermissionAccessEntry keyContainerPermissionAccessEntry = new KeyContainerPermissionAccessEntry(accessEntry);

            keyContainerPermissionAccessEntry.Flags |= KeyContainerPermission.GetApplicableFlags(accessEntry, target);
            this.AccessEntries.Add(keyContainerPermissionAccessEntry);
        }
        /// <summary>确定当前权限是否为指定权限的子集。</summary>
        /// <returns>如果当前权限是指定权限的子集,则为 true;否则为 false。</returns>
        /// <param name="target">要测试子集关系的权限。此权限必须与当前权限属于同一类型。</param>
        /// <exception cref="T:System.ArgumentException">
        /// <paramref name="target" /> 不是 null,并且未指定与当前权限属于同一类型的权限。</exception>
        public override bool IsSubsetOf(IPermission target)
        {
            if (target == null)
            {
                return(this.IsEmpty());
            }
            if (!this.VerifyType(target))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_WrongType", (object)this.GetType().FullName));
            }
            KeyContainerPermission target1 = (KeyContainerPermission)target;

            if ((this.m_flags & target1.m_flags) != this.m_flags)
            {
                return(false);
            }
            foreach (KeyContainerPermissionAccessEntry accessEntry in this.AccessEntries)
            {
                KeyContainerPermissionFlags applicableFlags = KeyContainerPermission.GetApplicableFlags(accessEntry, target1);
                if ((accessEntry.Flags & applicableFlags) != accessEntry.Flags)
                {
                    return(false);
                }
            }
            foreach (KeyContainerPermissionAccessEntry accessEntry in target1.AccessEntries)
            {
                KeyContainerPermissionFlags applicableFlags = KeyContainerPermission.GetApplicableFlags(accessEntry, this);
                if ((applicableFlags & accessEntry.Flags) != applicableFlags)
                {
                    return(false);
                }
            }
            return(true);
        }
        /// <summary>Determines whether the current permission is a subset of the specified permission.</summary>
        /// <param name="target">A permission to test for the subset relationship. This permission must be the same type as the current permission. </param>
        /// <returns>
        ///     <see langword="true" /> if the current permission is a subset of the specified permission; otherwise, <see langword="false" />.</returns>
        /// <exception cref="T:System.ArgumentException">
        ///         <paramref name="target" /> is not <see langword="null" /> and does not specify a permission of the same type as the current permission. </exception>
        // Token: 0x060026C5 RID: 9925 RVA: 0x0008C544 File Offset: 0x0008A744
        public override bool IsSubsetOf(IPermission target)
        {
            if (target == null)
            {
                return(this.IsEmpty());
            }
            if (!base.VerifyType(target))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_WrongType", new object[]
                {
                    base.GetType().FullName
                }));
            }
            KeyContainerPermission keyContainerPermission = (KeyContainerPermission)target;

            if ((this.m_flags & keyContainerPermission.m_flags) != this.m_flags)
            {
                return(false);
            }
            foreach (KeyContainerPermissionAccessEntry keyContainerPermissionAccessEntry in this.AccessEntries)
            {
                KeyContainerPermissionFlags applicableFlags = KeyContainerPermission.GetApplicableFlags(keyContainerPermissionAccessEntry, keyContainerPermission);
                if ((keyContainerPermissionAccessEntry.Flags & applicableFlags) != keyContainerPermissionAccessEntry.Flags)
                {
                    return(false);
                }
            }
            foreach (KeyContainerPermissionAccessEntry keyContainerPermissionAccessEntry2 in keyContainerPermission.AccessEntries)
            {
                KeyContainerPermissionFlags applicableFlags2 = KeyContainerPermission.GetApplicableFlags(keyContainerPermissionAccessEntry2, this);
                if ((applicableFlags2 & keyContainerPermissionAccessEntry2.Flags) != applicableFlags2)
                {
                    return(false);
                }
            }
            return(true);
        }