From b07d07a7d1fb3c36bc898b06d7f9a81e6ee4df56 Mon Sep 17 00:00:00 2001 From: andrewvk Date: Mon, 23 May 2016 11:14:57 +0300 Subject: [PATCH] AssertCondition in Code class --- Main/src/Assertions/Code.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Main/src/Assertions/Code.cs b/Main/src/Assertions/Code.cs index 659b51543..4175d70b7 100644 --- a/Main/src/Assertions/Code.cs +++ b/Main/src/Assertions/Code.cs @@ -22,7 +22,7 @@ public static partial class Code [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod] public static void NotNull( - [CanBeNull, NoEnumeration] T arg, + [CanBeNull, NoEnumeration, AssertionCondition(AssertionConditionType.IS_NOT_NULL)] T arg, [NotNull, InvokerParameterName] string argName) where T : class { if (arg == null) @@ -36,7 +36,7 @@ public static void NotNull( [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod] public static void NotNull( - [CanBeNull] T? arg, + [CanBeNull, AssertionCondition(AssertionConditionType.IS_NOT_NULL)] T? arg, [NotNull, InvokerParameterName] string argName) where T : struct { if (arg == null) @@ -76,7 +76,7 @@ public static void NotNullNorWhiteSpace( [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod] public static void AssertArgument( - bool condition, + [AssertionCondition(AssertionConditionType.IS_TRUE)] bool condition, [NotNull, InvokerParameterName] string argName, [NotNull] string message) { @@ -92,7 +92,7 @@ public static void AssertArgument( [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod, StringFormatMethod("messageFormat")] public static void AssertArgument( - bool condition, + [AssertionCondition(AssertionConditionType.IS_TRUE)] bool condition, [NotNull, InvokerParameterName] string argName, [NotNull] string messageFormat, [CanBeNull] params object[] args) @@ -217,7 +217,7 @@ public static void ValidIndexAndCount( [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod] public static void AssertState( - bool condition, + [AssertionCondition(AssertionConditionType.IS_TRUE)] bool condition, [NotNull] string message) { if (!condition) @@ -231,7 +231,7 @@ public static void AssertState( [DebuggerHidden, MethodImpl(AggressiveInlining)] [AssertionMethod, StringFormatMethod("messageFormat")] public static void AssertState( - bool condition, + [AssertionCondition(AssertionConditionType.IS_TRUE)] bool condition, [NotNull] string messageFormat, [CanBeNull] params object[] args) {