internal PermissionSet Resolve(Evidence evidence) { PermissionSet grantSet = null; if (CodeAccessSecurityEngine.TryResolveGrantSet(evidence, out grantSet)) { return(grantSet); } return(this.CodeGroupResolve(evidence, false)); }
[System.Security.SecurityCritical] // auto-generated internal PermissionSet Resolve(Evidence evidence) { // If we can resolve the grant set for the evidence via the host or the current AppDomain state, // then return that. Otherwise, call back out to code group resolution. PermissionSet grantSet = null; if (CodeAccessSecurityEngine.TryResolveGrantSet(evidence, out grantSet)) { return grantSet; } else { BCLDebug.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled, "We're about to apply policy in a policy disabled app"); return CodeGroupResolve(evidence, false); } }
// Token: 0x06001C6C RID: 7276 RVA: 0x0006188C File Offset: 0x0005FA8C private static PermissionSet ResolveGrantSet(Evidence evidence, out int specialFlags, bool checkExecutionPermission) { PermissionSet permissionSet = null; if (!CodeAccessSecurityEngine.TryResolveGrantSet(evidence, out permissionSet)) { permissionSet = new PermissionSet(PermissionState.Unrestricted); } if (checkExecutionPermission) { SecurityPermission perm = new SecurityPermission(SecurityPermissionFlag.Execution); if (!permissionSet.Contains(perm)) { throw new PolicyException(Environment.GetResourceString("Policy_NoExecutionPermission"), -2146233320); } } specialFlags = SecurityManager.GetSpecialFlags(permissionSet, null); return(permissionSet); }