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); }
internal bool CheckSetDemand(PermissionSet demandSet, out PermissionSet alteredDemandset, RuntimeMethodHandleInternal rmh) { alteredDemandset = (PermissionSet)null; if (!PermissionSetTriple.CheckAssert(this.AssertSet, demandSet, out alteredDemandset)) { return(false); } if (alteredDemandset != null) { demandSet = alteredDemandset; } CodeAccessSecurityEngine.CheckSetHelper(this.GrantSet, this.RefusedSet, demandSet, rmh, (object)null, SecurityAction.Demand, true); return(true); }