System.Security.PermissionSetTriple.CheckAssert C# (CSharp) Method

CheckAssert() static private method

static private CheckAssert ( PermissionSet assertPset, PermissionSet demandSet, PermissionSet &newDemandSet ) : bool
assertPset PermissionSet
demandSet PermissionSet
newDemandSet PermissionSet
return bool
        static bool CheckAssert(PermissionSet assertPset, PermissionSet demandSet, out PermissionSet newDemandSet)
        {
            newDemandSet = null;
            if (assertPset!= null)
            {
                assertPset.CheckDecoded(demandSet);
                // If this frame asserts a superset of the demand set we're done
            
                if (demandSet.CheckAssertion(assertPset))
                    return SecurityRuntime.StackHalt;
                PermissionSet.RemoveAssertedPermissionSet(demandSet, assertPset, out newDemandSet);
            }
            return SecurityRuntime.StackContinue;
        }

Same methods

PermissionSetTriple::CheckAssert ( PermissionSet pSet, CodeAccessPermission demand, PermissionToken permToken ) : bool

Usage Example

Beispiel #1
0
 internal bool CheckDemand(CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandleInternal rmh)
 {
     if (!PermissionSetTriple.CheckAssert(this.AssertSet, demand, permToken))
     {
         return(false);
     }
     CodeAccessSecurityEngine.CheckHelper(this.GrantSet, this.RefusedSet, demand, permToken, rmh, (object)null, SecurityAction.Demand, true);
     return(true);
 }
All Usage Examples Of System.Security.PermissionSetTriple::CheckAssert