summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-28 14:43:09 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-28 16:11:48 +0900
commitf5c6d8a9014bbcf0026c33d4b374bb281d361182 (patch)
tree483edfc47b6028c53fc115da489f5dba3ce624c5 /src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
parente4b937600de48a883039191030fb69b07c52b8c2 (diff)
parentdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff)
downloadcoreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.tar.gz
coreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.tar.bz2
coreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.zip
Merge branch 'upstream' into tizen
Change-Id: I4400c6fae623c356170074871ee575b96a4af206
Diffstat (limited to 'src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs')
-rw-r--r--src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs b/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
index e002e6a5c1..27f4f4cdaa 100644
--- a/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
+++ b/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
@@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
@@ -287,7 +288,7 @@ namespace System.Diagnostics.Contracts {
/// </summary>
/// <param name="condition">Expression to assume will always be true.</param>
/// <remarks>
- /// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Contract.Assert(bool)"/>.
+ /// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Debug.Assert(bool)"/>.
/// </remarks>
[Pure]
[Conditional("DEBUG")]
@@ -308,7 +309,7 @@ namespace System.Diagnostics.Contracts {
/// <param name="condition">Expression to assume will always be true.</param>
/// <param name="userMessage">If it is not a constant string literal, then the contract may not be understood by tools.</param>
/// <remarks>
- /// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Contract.Assert(bool)"/>.
+ /// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Debug.Assert(bool)"/>.
/// </remarks>
[Pure]
[Conditional("DEBUG")]
@@ -654,7 +655,7 @@ namespace System.Diagnostics.Contracts {
throw new ArgumentException("fromInclusive must be less than or equal to toExclusive.");
#endif
if (predicate == null)
- throw new ArgumentNullException("predicate");
+ throw new ArgumentNullException(nameof(predicate));
Contract.EndContractBlock();
for (int i = fromInclusive; i < toExclusive; i++)
@@ -679,9 +680,9 @@ namespace System.Diagnostics.Contracts {
public static bool ForAll<T>(IEnumerable<T> collection, Predicate<T> predicate)
{
if (collection == null)
- throw new ArgumentNullException("collection");
+ throw new ArgumentNullException(nameof(collection));
if (predicate == null)
- throw new ArgumentNullException("predicate");
+ throw new ArgumentNullException(nameof(predicate));
Contract.EndContractBlock();
foreach (T t in collection)
@@ -716,7 +717,7 @@ namespace System.Diagnostics.Contracts {
throw new ArgumentException("fromInclusive must be less than or equal to toExclusive.");
#endif
if (predicate == null)
- throw new ArgumentNullException("predicate");
+ throw new ArgumentNullException(nameof(predicate));
Contract.EndContractBlock();
for (int i = fromInclusive; i < toExclusive; i++)
@@ -740,9 +741,9 @@ namespace System.Diagnostics.Contracts {
public static bool Exists<T>(IEnumerable<T> collection, Predicate<T> predicate)
{
if (collection == null)
- throw new ArgumentNullException("collection");
+ throw new ArgumentNullException(nameof(collection));
if (predicate == null)
- throw new ArgumentNullException("predicate");
+ throw new ArgumentNullException(nameof(predicate));
Contract.EndContractBlock();
foreach (T t in collection)
@@ -805,7 +806,6 @@ namespace System.Diagnostics.Contracts {
[CLSCompliant(false)]
[Pure]
[ContractRuntimeIgnored]
- [SecurityCritical]
#if FEATURE_RELIABILITY_CONTRACTS
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#endif
@@ -852,7 +852,6 @@ namespace System.Diagnostics.Contracts {
[CLSCompliant(false)]
[Pure]
[ContractRuntimeIgnored]
- [SecurityCritical]
#if FEATURE_RELIABILITY_CONTRACTS
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#endif