summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs')
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
index 847147ade8..4c6169a4e8 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
@@ -7,6 +7,7 @@
using System;
using System.Security;
using System.Collections;
+using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
@@ -27,10 +28,9 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IDisposableToIClosableAdapter()
{
- Contract.Assert(false, "This class is never instantiated");
+ Debug.Assert(false, "This class is never instantiated");
}
- [SecurityCritical]
public void Close()
{
IDisposable _this = JitHelpers.UnsafeCast<IDisposable>(this);
@@ -39,15 +39,13 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// Adapter class which converts IDisposable.Dispose calls into IClosable.Close
- [SecurityCritical]
internal sealed class IClosableToIDisposableAdapter
{
private IClosableToIDisposableAdapter()
{
- Contract.Assert(false, "This class is never instantiated");
+ Debug.Assert(false, "This class is never instantiated");
}
- [SecurityCritical]
private void Dispose()
{
IClosable _this = JitHelpers.UnsafeCast<IClosable>(this);