diff --git a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs index 0e71df6b59..d433fff59b 100644 --- a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs @@ -46,6 +46,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) { return string.IsNullOrEmpty(str); @@ -54,6 +55,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) { return string.IsNullOrWhiteSpace(str); diff --git a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs index 4df3010aba..83fbf59629 100644 --- a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs @@ -12,6 +12,7 @@ public static class AbpCollectionExtensions /// /// Checks whatever given collection object is null or has no item. /// + [ContractAnnotation("source:null => true")] public static bool IsNullOrEmpty([CanBeNull] this ICollection source) { return source == null || source.Count <= 0;