CheckSetHelper() static private méthode

static private CheckSetHelper ( PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, bool throwException ) : bool
grants PermissionSet
refused PermissionSet
demands PermissionSet
rmh System.RuntimeMethodHandle
assemblyOrString Object
action SecurityAction
throwException bool
Résultat bool
Exemple #1
0
 internal static void CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action)
 {
     if (cs != null)
     {
         cs.CheckSetDemand(demands, rmh);
         return;
     }
     CodeAccessSecurityEngine.CheckSetHelper(grants, refused, demands, rmh, asm, action, true);
 }
Exemple #2
0
        internal bool CheckSetDemandNoThrow(PermissionSet demandSet)
        {
            Debug.Assert(AssertSet == null, "AssertSet not null");

#pragma warning disable 618
            return(CodeAccessSecurityEngine.CheckSetHelper(GrantSet, RefusedSet, demandSet, RuntimeMethodHandleInternal.EmptyHandle, null, SecurityAction.Demand, false));

#pragma warning restore 618
        }
Exemple #3
0
 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);
 }
Exemple #4
0
        internal bool CheckSetDemand(PermissionSet demandSet, out PermissionSet alteredDemandset, RuntimeMethodHandle rmh)
        {
            alteredDemandset = null;

            if (CheckAssert(AssertSet, demandSet, out alteredDemandset) == SecurityRuntime.StackHalt)
            {
                return(SecurityRuntime.StackHalt);
            }
            if (alteredDemandset != null)
            {
                demandSet = alteredDemandset; // note that this does not modify demandSet external to this function.
            }
            CodeAccessSecurityEngine.CheckSetHelper(GrantSet, RefusedSet, demandSet, rmh, null, SecurityAction.Demand, true);

            return(SecurityRuntime.StackContinue);
        }
Exemple #5
0
 internal bool CheckSetDemandNoThrow(PermissionSet demandSet)
 {
     return(CodeAccessSecurityEngine.CheckSetHelper(this.GrantSet, this.RefusedSet, demandSet, RuntimeMethodHandleInternal.EmptyHandle, (object)null, SecurityAction.Demand, false));
 }
Exemple #6
0
        internal bool CheckSetDemandNoThrow(PermissionSet demandSet)
        {
            BCLDebug.Assert(AssertSet == null, "AssertSet not null");

            return(CodeAccessSecurityEngine.CheckSetHelper(GrantSet, RefusedSet, demandSet, s_emptyRMH, null, SecurityAction.Demand, false));
        }