summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs')
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
index 395bef93d5..f11260eb4a 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
@@ -8,6 +8,7 @@ using System;
using System.Security;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
@@ -29,12 +30,11 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private MapToCollectionAdapter()
{
- Contract.Assert(false, "This class is never instantiated");
+ Debug.Assert(false, "This class is never instantiated");
}
// int Count { get }
[Pure]
- [SecurityCritical]
internal int Count<K, V>()
{
object _this = JitHelpers.UnsafeCast<object>(this);
@@ -66,14 +66,12 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// bool IsReadOnly { get }
- [SecurityCritical]
internal bool IsReadOnly<K, V>()
{
return false;
}
// void Add(T item)
- [SecurityCritical]
internal void Add<K, V>(KeyValuePair<K, V> item)
{
object _this = JitHelpers.UnsafeCast<object>(this);
@@ -91,7 +89,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// void Clear()
- [SecurityCritical]
internal void Clear<K, V>()
{
object _this = JitHelpers.UnsafeCast<object>(this);
@@ -109,7 +106,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// bool Contains(T item)
- [SecurityCritical]
internal bool Contains<K, V>(KeyValuePair<K, V> item)
{
object _this = JitHelpers.UnsafeCast<object>(this);
@@ -135,14 +131,13 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// void CopyTo(T[] array, int arrayIndex)
- [SecurityCritical]
internal void CopyTo<K, V>(KeyValuePair<K, V>[] array, int arrayIndex)
{
if (array == null)
- throw new ArgumentNullException("array");
+ throw new ArgumentNullException(nameof(array));
if (arrayIndex < 0)
- throw new ArgumentOutOfRangeException("arrayIndex");
+ throw new ArgumentOutOfRangeException(nameof(arrayIndex));
if (array.Length <= arrayIndex && Count<K, V>() > 0)
throw new ArgumentException(Environment.GetResourceString("Argument_IndexOutOfArrayBounds"));
@@ -160,7 +155,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
// bool Remove(T item)
- [SecurityCritical]
internal bool Remove<K, V>(KeyValuePair<K, V> item)
{
object _this = JitHelpers.UnsafeCast<object>(this);