summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs')
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
index 58e0d7ad1d..08ae0955a8 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
@@ -22,10 +22,6 @@ namespace Microsoft.Win32.SafeHandles
using System.Runtime.ConstrainedExecution;
// Class of safe handle which uses 0 or -1 as an invalid handle.
- [System.Security.SecurityCritical] // auto-generated_required
-#if !FEATURE_CORECLR
- [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)]
-#endif
public abstract class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
@@ -33,25 +29,18 @@ namespace Microsoft.Win32.SafeHandles
{
}
-#if FEATURE_CORECLR
// A default constructor is needed to satisfy CoreCLR inheritence rules. It should not be called at runtime
protected SafeHandleZeroOrMinusOneIsInvalid()
{
throw new NotImplementedException();
}
-#endif // FEATURE_CORECLR
public override bool IsInvalid {
- [System.Security.SecurityCritical]
get { return handle.IsNull() || handle == new IntPtr(-1); }
}
}
// Class of safe handle which uses only -1 as an invalid handle.
- [System.Security.SecurityCritical] // auto-generated_required
-#if !FEATURE_CORECLR
- [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)]
-#endif
public abstract class SafeHandleMinusOneIsInvalid : SafeHandle
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
@@ -59,25 +48,18 @@ namespace Microsoft.Win32.SafeHandles
{
}
-#if FEATURE_CORECLR
// A default constructor is needed to satisfy CoreCLR inheritence rules. It should not be called at runtime
protected SafeHandleMinusOneIsInvalid()
{
throw new NotImplementedException();
}
-#endif // FEATURE_CORECLR
public override bool IsInvalid {
- [System.Security.SecurityCritical]
get { return handle == new IntPtr(-1); }
}
}
// Class of critical handle which uses 0 or -1 as an invalid handle.
- [System.Security.SecurityCritical] // auto-generated_required
-#if !FEATURE_CORECLR
- [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)]
-#endif
public abstract class CriticalHandleZeroOrMinusOneIsInvalid : CriticalHandle
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
@@ -86,16 +68,11 @@ namespace Microsoft.Win32.SafeHandles
}
public override bool IsInvalid {
- [System.Security.SecurityCritical]
get { return handle.IsNull() || handle == new IntPtr(-1); }
}
}
// Class of critical handle which uses only -1 as an invalid handle.
- [System.Security.SecurityCritical] // auto-generated_required
-#if !FEATURE_CORECLR
- [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)]
-#endif
public abstract class CriticalHandleMinusOneIsInvalid : CriticalHandle
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
@@ -104,9 +81,7 @@ namespace Microsoft.Win32.SafeHandles
}
public override bool IsInvalid {
- [System.Security.SecurityCritical]
get { return handle == new IntPtr(-1); }
}
}
-
}