Skip to content

Commit 28bfbea

Browse files
committed
Add CallerArgumentExpression to Guard
1 parent 2c26991 commit 28bfbea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SharedInfrastructure/Guard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal static partial class Guard
2121
/// <typeparam name="TValue">The type of the value.</typeparam>
2222
/// <exception cref="ArgumentNullException"><paramref name="value"/> is null.</exception>
2323
[MethodImpl(MethodImplOptions.AggressiveInlining)]
24-
public static void NotNull<TValue>([NotNull]TValue? value, string parameterName)
24+
public static void NotNull<TValue>([NotNull]TValue? value, [CallerArgumentExpression("value")] string? parameterName = null)
2525
where TValue : class =>
2626
ArgumentNullException.ThrowIfNull(value, parameterName);
2727

0 commit comments

Comments
 (0)