diff --git a/SystemExtensions.NetCore/Extensions/ObjectExtensions.cs b/SystemExtensions.NetCore/Extensions/ObjectExtensions.cs index ddc67d6..bc2c2a5 100644 --- a/SystemExtensions.NetCore/Extensions/ObjectExtensions.cs +++ b/SystemExtensions.NetCore/Extensions/ObjectExtensions.cs @@ -1,10 +1,11 @@ -using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Core.Extensions; public static class ObjectExtensions { - public static T ThrowIfNull([ValidatedNotNull] this T obj, [CallerArgumentExpression("obj")] string? paramName = null) + public static T ThrowIfNull([NotNull] this T obj, [CallerArgumentExpression("obj")] string? paramName = null) where T : class { if (obj is null) @@ -14,9 +15,4 @@ public static class ObjectExtensions return obj; } - - [AttributeUsage(AttributeTargets.Parameter)] - sealed class ValidatedNotNullAttribute : Attribute - { - } } diff --git a/SystemExtensions.NetCore/SystemExtensions.NetCore.csproj b/SystemExtensions.NetCore/SystemExtensions.NetCore.csproj index a2411e2..e2e5dac 100644 --- a/SystemExtensions.NetCore/SystemExtensions.NetCore.csproj +++ b/SystemExtensions.NetCore/SystemExtensions.NetCore.csproj @@ -8,7 +8,7 @@ System LICENSE true - 1.6.9 + 1.6.10 Alexandru Macocian https://github.com/AlexMacocian/SystemExtensions Extensions for the System namespace diff --git a/SystemExtensions.NetStandard/SystemExtensions.NetStandard.csproj b/SystemExtensions.NetStandard/SystemExtensions.NetStandard.csproj index 91eb33b..136b079 100644 --- a/SystemExtensions.NetStandard/SystemExtensions.NetStandard.csproj +++ b/SystemExtensions.NetStandard/SystemExtensions.NetStandard.csproj @@ -7,7 +7,7 @@ LICENSE true System - 1.6.9 + 1.6.10 Alexandru Macocian https://github.com/AlexMacocian/SystemExtensions Extensions for the System namespace