Skip to content

Commit

Permalink
update ArgumentNullException.ThrowIfNull usage (#2563)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi authored Dec 9, 2024
1 parent 5a58c24 commit b6cfbd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static partial class ArgumentNullThrowHelper
/// <param name="paramName">The name of the parameter with which <paramref name="argument"/> corresponds.</param>
public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression("argument")] string? paramName = null)
{
#if !NET7_0_OR_GREATER
#if !NET6_0_OR_GREATER
if (argument is null)
{
Throw(paramName);
Expand All @@ -23,7 +23,7 @@ public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpres
#endif
}

#if !NET7_0_OR_GREATER
#if !NET6_0_OR_GREATER
[DoesNotReturn]
internal static void Throw(string? paramName) =>
throw new ArgumentNullException(paramName);
Expand Down

0 comments on commit b6cfbd0

Please sign in to comment.