static private CheckHelper ( |
||
grantedSet | ||
refusedSet | ||
demand | ||
permToken | ||
rmh | ||
assemblyOrString | Object | |
action | SecurityAction | |
throwException | bool | |
Результат | bool |
internal static void CheckAssembly(RuntimeAssembly asm, CodeAccessPermission demand) { PermissionSet grantedSet; PermissionSet refusedSet; asm.GetGrantSet(out grantedSet, out refusedSet); CodeAccessSecurityEngine.CheckHelper(grantedSet, refusedSet, demand, PermissionToken.GetToken(demand), RuntimeMethodHandleInternal.EmptyHandle, asm, SecurityAction.Demand, true); }
internal bool CheckDemandNoThrow(CodeAccessPermission demand, PermissionToken permToken) { Debug.Assert(AssertSet == null, "AssertSet not null"); #pragma warning disable 618 return(CodeAccessSecurityEngine.CheckHelper(GrantSet, RefusedSet, demand, permToken, RuntimeMethodHandleInternal.EmptyHandle, null, SecurityAction.Demand, false)); #pragma warning restore 618 }
internal static void CheckAssembly(RuntimeAssembly asm, CodeAccessPermission demand) { PermissionSet newGrant; PermissionSet newDenied; asm.GetGrantSet(out newGrant, out newDenied); CodeAccessSecurityEngine.CheckHelper(newGrant, newDenied, demand, PermissionToken.GetToken((IPermission)demand), RuntimeMethodHandleInternal.EmptyHandle, (object)asm, SecurityAction.Demand, true); }
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 static void CheckHelper(CompressedStack cs, PermissionSet grantedSet, PermissionSet refusedSet, CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) { if (cs != null) { cs.CheckDemand(demand, permToken, rmh); return; } CodeAccessSecurityEngine.CheckHelper(grantedSet, refusedSet, demand, permToken, rmh, asm, action, true); }
internal bool CheckDemand(CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandle rmh) { if (CheckAssert(AssertSet, demand, permToken) == SecurityRuntime.StackHalt) { return(SecurityRuntime.StackHalt); } CodeAccessSecurityEngine.CheckHelper(GrantSet, RefusedSet, demand, permToken, rmh, null, SecurityAction.Demand, true); return(SecurityRuntime.StackContinue); }
internal bool CheckDemandNoThrow(CodeAccessPermission demand, PermissionToken permToken) { return(CodeAccessSecurityEngine.CheckHelper(this.GrantSet, this.RefusedSet, demand, permToken, RuntimeMethodHandleInternal.EmptyHandle, (object)null, SecurityAction.Demand, false)); }
internal bool CheckDemandNoThrow(CodeAccessPermission demand, PermissionToken permToken) { BCLDebug.Assert(AssertSet == null, "AssertSet not null"); return(CodeAccessSecurityEngine.CheckHelper(GrantSet, RefusedSet, demand, permToken, s_emptyRMH, null, SecurityAction.Demand, false)); }