Skip to content

Commit c9faee4

Browse files
committed
Исправлен CallerArgumentExpression и добавлен using
В ArgumentNullExceptionEx.cs для ThrowIfNull теперь используется nameof(argument) в CallerArgumentExpression для большей надёжности. В MathCore.DSP.csproj добавлен using для MathCore.DSP.Infrastructure.Extensions.
1 parent f9ee74c commit c9faee4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

MathCore.DSP/Infrastructure/ArgumentNullExceptionEx.cs renamed to MathCore.DSP/Infrastructure/Extensions/ArgumentNullExceptionEx.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NET8_0_OR_GREATER
1+
#if NETSTANDARD2_0
22
using System.Runtime.CompilerServices;
33

44
namespace MathCore.DSP.Infrastructure;
@@ -7,7 +7,7 @@ internal static class ArgumentNullExceptionEx
77
{
88
extension(ArgumentNullException)
99
{
10-
public static void ThrowIfNull(object? argument, [CallerArgumentExpression("argument")] string? ParamName = null)
10+
public static void ThrowIfNull(object? argument, [CallerArgumentExpression(nameof(argument))] string? ParamName = null)
1111
{
1212
if (argument != null)
1313
return;

MathCore.DSP/MathCore.DSP.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
<ItemGroup>
6464
<Using Include="MathCore.DSP.Infrastructure" />
65+
<Using Include="MathCore.DSP.Infrastructure.Extensions" />
6566
</ItemGroup>
6667

6768
<ItemGroup>

0 commit comments

Comments
 (0)