Exemple #1
-1
        private static bool CheckDynamicMethodHelper(DynamicResolver dynamicResolver, IPermission demandIn, PermissionToken permToken, RuntimeMethodHandleInternal rmh)
        {
            CompressedStack securityContext = dynamicResolver.GetSecurityContext();

            try
            {
                return(securityContext.CheckDemandNoHalt((CodeAccessPermission)demandIn, permToken, rmh));
            }
            catch (SecurityException ex)
            {
                throw new SecurityException(Environment.GetResourceString("Security_AnonymouslyHostedDynamicMethodCheckFailed"), (Exception)ex);
            }
        }