private static CodeAccessPermission CreateExecutePermission() { OraclePermission permission = new OraclePermission(PermissionState.None); permission.Add(string.Empty, string.Empty, KeyRestrictionBehavior.AllowOnly); return(permission); }
static internal PermissionSet CreatePermission(OracleConnectionString constr) { OraclePermission p = new OraclePermission(constr); if (null == constr) { p.Add(ADP.StrEmpty, ADP.StrEmpty, KeyRestrictionBehavior.AllowOnly); // ExecuteOnly permission } PermissionSet permission; NamedPermissionSet fulltrust = new NamedPermissionSet("FullTrust"); // MDAC 83159 fulltrust.Assert(); try { try { permission = new PermissionSet(fulltrust); permission.AddPermission(p); } finally { CodeAccessPermission.RevertAssert(); } } catch { throw; } return permission; }
private static CodeAccessPermission CreateExecutePermission() { OraclePermission permission = new OraclePermission(PermissionState.None); permission.Add(string.Empty, string.Empty, KeyRestrictionBehavior.AllowOnly); return permission; }