diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs index 5eeb0afcfc..898f1a68a0 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.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; @@ -26,12 +27,11 @@ namespace System.Runtime.InteropServices.WindowsRuntime { private VectorToCollectionAdapter() { - Contract.Assert(false, "This class is never instantiated"); + Debug.Assert(false, "This class is never instantiated"); } // int Count { get } [Pure] - [SecurityCritical] internal int Count<T>() { IVector<T> _this = JitHelpers.UnsafeCast<IVector<T>>(this); @@ -45,14 +45,12 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // bool IsReadOnly { get } - [SecurityCritical] internal bool IsReadOnly<T>() { return false; } // void Add(T item) - [SecurityCritical] internal void Add<T>(T item) { IVector<T> _this = JitHelpers.UnsafeCast<IVector<T>>(this); @@ -60,7 +58,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // void Clear() - [SecurityCritical] internal void Clear<T>() { IVector<T> _this = JitHelpers.UnsafeCast<IVector<T>>(this); @@ -68,7 +65,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // bool Contains(T item) - [SecurityCritical] internal bool Contains<T>(T item) { IVector<T> _this = JitHelpers.UnsafeCast<IVector<T>>(this); @@ -78,14 +74,13 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // void CopyTo(T[] array, int arrayIndex) - [SecurityCritical] internal void CopyTo<T>(T[] 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<T>() > 0) throw new ArgumentException(Environment.GetResourceString("Argument_IndexOutOfArrayBounds")); @@ -104,7 +99,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // bool Remove(T item) - [SecurityCritical] internal bool Remove<T>(T item) { IVector<T> _this = JitHelpers.UnsafeCast<IVector<T>>(this); |