diff --git a/src/FasterKv.Cache.Core/Configurations/FasterKvCacheOptions.cs b/src/FasterKv.Cache.Core/Configurations/FasterKvCacheOptions.cs index 71171ba..0272c01 100644 --- a/src/FasterKv.Cache.Core/Configurations/FasterKvCacheOptions.cs +++ b/src/FasterKv.Cache.Core/Configurations/FasterKvCacheOptions.cs @@ -48,7 +48,7 @@ public class FasterKvCacheOptions /// /// Default: {CurrentDirectory}/FasterKvCache/{Environment.ProcessId}-HLog public string LogPath { get; set; } = -#if (NET6_0 || NET7_0) +#if NET6_0_OR_GREATER Path.Combine(Environment.CurrentDirectory, $"FasterKvCache/{Environment.ProcessId}-HLog"); #else Path.Combine(Environment.CurrentDirectory, diff --git a/src/FasterKv.Cache.Core/Guards.cs b/src/FasterKv.Cache.Core/Guards.cs index 6c0923d..3afc6cd 100644 --- a/src/FasterKv.Cache.Core/Guards.cs +++ b/src/FasterKv.Cache.Core/Guards.cs @@ -1,6 +1,6 @@ using System; using System.Runtime.CompilerServices; -#if (NET6_0 || NET7_0) +#if NET6_0_OR_GREATER using System.Diagnostics.CodeAnalysis; #endif @@ -18,11 +18,11 @@ public static class Guards /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ArgumentNotNull( -#if (NET6_0 || NET7) +#if NET6_0_OR_GREATER [NotNull] #endif this T? obj, -#if (NET6_0 || NET7) +#if NET6_0_OR_GREATER [CallerArgumentExpression(nameof(obj))] #endif string? name = null) @@ -38,11 +38,11 @@ public static T ArgumentNotNull( /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static string ArgumentNotNullOrEmpty( -#if (NET6_0 || NET7) +#if NET6_0_OR_GREATER [NotNull] #endif this string? obj, -#if (NET6_0 || NET7) +#if NET6_0_OR_GREATER [CallerArgumentExpression(nameof(obj))] #endif string? name = null) @@ -55,7 +55,7 @@ public static string ArgumentNotNullOrEmpty( /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsNullOrEmpty( -#if (NET6_0 || NET7_0) +#if NET6_0_OR_GREATER [NotNullWhen(false)] #endif this string? str) @@ -68,7 +68,7 @@ public static bool IsNullOrEmpty( /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool NotNullOrEmpty( -#if (NET6_0 || NET7_0) +#if NET6_0_OR_GREATER [NotNullWhen(true)] #endif this string? str)