diff --git a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs index c7153264ae..3d44fa988a 100644 --- a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs @@ -47,7 +47,7 @@ public static class AbpStringExtensions /// Indicates whether this string is null or an System.String.Empty string. /// [ContractAnnotation("str:null => true")] - public static bool IsNullOrEmpty(this string? str) + public static bool IsNullOrEmpty([System.Diagnostics.CodeAnalysis.NotNullWhen(false)]this string? str) { return string.IsNullOrEmpty(str); } @@ -56,7 +56,7 @@ public static class AbpStringExtensions /// indicates whether this string is null, empty, or consists only of white-space characters. /// [ContractAnnotation("str:null => true")] - public static bool IsNullOrWhiteSpace(this string? str) + public static bool IsNullOrWhiteSpace([System.Diagnostics.CodeAnalysis.NotNullWhen(false)]this string? str) { return string.IsNullOrWhiteSpace(str); } diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index c250d07eee..9709051409 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -37,4 +37,10 @@ + + + all + runtime; build; native; contentfiles; analyzers + +