System.Security.Permissions.StrongNameIdentityPermission.IsSubsetOf C# (CSharp) Méthode

IsSubsetOf() public méthode

public IsSubsetOf ( IPermission target ) : bool
target IPermission
Résultat bool
        public override bool IsSubsetOf(IPermission target)
        {
            return false;
        }

Same methods

StrongNameIdentityPermission::IsSubsetOf ( System target ) : bool

Usage Example

Exemple #1
0
        /// <include file='doc\StrongNameIdentityPermission.uex' path='docs/doc[@for="StrongNameIdentityPermission.Union"]/*' />
        public override IPermission Union(IPermission target)
        {
            if (target == null)
            {
                return(this.m_publicKeyBlob != null?this.Copy() : null);
            }
            else if (!VerifyType(target))
            {
                throw new
                      ArgumentException(
                          String.Format(Environment.GetResourceString("Argument_WrongType"), this.GetType().FullName)
                          );
            }

            StrongNameIdentityPermission operand = (StrongNameIdentityPermission)target;

            // Union is only defined on permissions where one is a subset of the other.
            // For Union, simply return a copy of whichever contains the other.

            if (operand.IsSubsetOf(this))
            {
                return(this.Copy());
            }
            else if (this.IsSubsetOf(operand))
            {
                return(operand.Copy());
            }
            else
            {
                return(null);
            }
        }
All Usage Examples Of System.Security.Permissions.StrongNameIdentityPermission::IsSubsetOf