Add and use InvalidOperationExceptionExtensions.ThrowIf

このコミットが含まれているのは:
Sergio Pedri committed 2023-02-25 17:42:11 +01:00
1 親 e4c7b5161c
コミット e27fb13a01
6ファイル変更
+51 -55

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -15,7 +15,7 @@ internal static class ArgumentExceptionExtensions
/// <param name="condition">The condition to decide whether to throw the exception.</param>
/// <param name="parameterName">The name of the parameter with which <paramref name="condition"/> corresponds.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ThrowIf(this ArgumentException? _, bool condition, string? parameterName = null)
public static void ThrowIf(this ArgumentException? _, [DoesNotReturnIf(true)] bool condition, string? parameterName = null)
{
if (condition)
{