Inheritance: System.Security.CodeAccessPermission, IUnrestrictedPermission
        public override bool IsSubsetOf(IPermission target)
        {
            if (target == null)
            {
                return(m_flags == TypeDescriptorPermissionFlags.NoFlags);
            }

            try
            {
                TypeDescriptorPermission      operand    = (TypeDescriptorPermission)target;
                TypeDescriptorPermissionFlags sourceFlag = this.m_flags;
                TypeDescriptorPermissionFlags targetFlag = operand.m_flags;
                return((sourceFlag & targetFlag) == sourceFlag);
            }
            catch (InvalidCastException)
            {
                throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.GetString(SR.Argument_WrongType), this.GetType().FullName));
            }
        }
        public override bool IsSubsetOf(IPermission target)
        {
            bool flag;

            if (target == null)
            {
                return(this.m_flags == TypeDescriptorPermissionFlags.NoFlags);
            }
            try
            {
                TypeDescriptorPermission      permission = (TypeDescriptorPermission)target;
                TypeDescriptorPermissionFlags flags      = this.m_flags;
                TypeDescriptorPermissionFlags flags2     = permission.m_flags;
                flag = (flags & flags2) == flags;
            }
            catch (InvalidCastException)
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.GetString("Argument_WrongType"), new object[] { base.GetType().FullName }));
            }
            return(flag);
        }
 public override IPermission Intersect(IPermission target)
 {
     IPermission permission2;
     if (target == null)
     {
         return null;
     }
     try
     {
         TypeDescriptorPermission permission = (TypeDescriptorPermission) target;
         TypeDescriptorPermissionFlags flag = permission.m_flags & this.m_flags;
         if (flag == TypeDescriptorPermissionFlags.NoFlags)
         {
             return null;
         }
         permission2 = new TypeDescriptorPermission(flag);
     }
     catch (InvalidCastException)
     {
         throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.GetString("Argument_WrongType"), new object[] { base.GetType().FullName }));
     }
     return permission2;
 }
        public override IPermission Intersect(IPermission target)
        {
            IPermission permission2;

            if (target == null)
            {
                return(null);
            }
            try
            {
                TypeDescriptorPermission      permission = (TypeDescriptorPermission)target;
                TypeDescriptorPermissionFlags flag       = permission.m_flags & this.m_flags;
                if (flag == TypeDescriptorPermissionFlags.NoFlags)
                {
                    return(null);
                }
                permission2 = new TypeDescriptorPermission(flag);
            }
            catch (InvalidCastException)
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.GetString("Argument_WrongType"), new object[] { base.GetType().FullName }));
            }
            return(permission2);
        }