From b6cfbd05e9ccb47ef64c2b8a2f88260fab46470e Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Mon, 9 Dec 2024 08:35:21 +0800 Subject: [PATCH] update ArgumentNullException.ThrowIfNull usage (#2563) --- src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs index fd0129fb3..904072415 100644 --- a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs +++ b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs @@ -13,7 +13,7 @@ internal static partial class ArgumentNullThrowHelper /// The name of the parameter with which corresponds. 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); @@ -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);