diff options
Diffstat (limited to 'src/mscorlib/src/System/Security/SecurityException.cs')
-rw-r--r-- | src/mscorlib/src/System/Security/SecurityException.cs | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/mscorlib/src/System/Security/SecurityException.cs b/src/mscorlib/src/System/Security/SecurityException.cs index c76674cdb9..8811be82ff 100644 --- a/src/mscorlib/src/System/Security/SecurityException.cs +++ b/src/mscorlib/src/System/Security/SecurityException.cs @@ -18,30 +18,23 @@ namespace System.Security using System.Security; using System; using System.Runtime.Serialization; - using System.Security.Permissions; using System.Reflection; using System.Text; using System.Security.Policy; using System.IO; -#if FEATURE_SERIALIZATION - using System.Runtime.Serialization.Formatters.Binary; -#endif // FEATURE_SERIALIZATION using System.Globalization; - using System.Security.Util; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SecurityException : SystemException { internal static string GetResString(string sResourceName) { - PermissionSet.s_fullTrust.Assert(); return Environment.GetResourceString(sResourceName); } #pragma warning disable 618 - internal static Exception MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) + internal static Exception MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, RuntimeMethodHandleInternal rmh, Object demand) #pragma warning restore 618 { return new SecurityException(GetResString("Arg_SecurityException")); @@ -66,16 +59,6 @@ namespace System.Security SetErrorCode(System.__HResults.COR_E_SECURITY); } - internal SecurityException(PermissionSet grantedSetObj, PermissionSet refusedSetObj) - : this(){} -#pragma warning disable 618 - internal SecurityException(string message, AssemblyName assemblyName, PermissionSet grant, PermissionSet refused, MethodInfo method, SecurityAction action, Object demanded, IPermission permThatFailed, Evidence evidence) -#pragma warning restore 618 - : this(){} - - internal SecurityException(string message, Object deny, Object permitOnly, MethodInfo method, Object demanded, IPermission permThatFailed) - : this(){} - protected SecurityException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) @@ -88,22 +71,6 @@ namespace System.Security return base.ToString(); } - private bool CanAccessSensitiveInfo() - { - bool retVal = false; - try - { -#pragma warning disable 618 - new SecurityPermission(SecurityPermissionFlag.ControlEvidence | SecurityPermissionFlag.ControlPolicy).Demand(); -#pragma warning restore 618 - retVal = true; - } - catch (SecurityException) - { - } - return retVal; - } - public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) |