Skip to content

Commit

Permalink
Merge pull request #5 from InCerryGit/ls_define
Browse files Browse the repository at this point in the history
Use `NET6_0_OR_GREATER` instead of `(NET6_0 || NET7_0)`
  • Loading branch information
InCerryGit authored Nov 29, 2022
2 parents cbe15db + 707d3ab commit 804c091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class FasterKvCacheOptions
/// </summary>
/// <para>Default: {CurrentDirectory}/FasterKvCache/{Environment.ProcessId}-HLog </para>
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,
Expand Down
14 changes: 7 additions & 7 deletions src/FasterKv.Cache.Core/Guards.cs
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -18,11 +18,11 @@ public static class Guards
/// <exception cref="ArgumentNullException"></exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T ArgumentNotNull<T>(
#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)
Expand All @@ -38,11 +38,11 @@ public static T ArgumentNotNull<T>(
/// <exception cref="ArgumentNullException"></exception>
[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)
Expand All @@ -55,7 +55,7 @@ public static string ArgumentNotNullOrEmpty(
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNullOrEmpty(
#if (NET6_0 || NET7_0)
#if NET6_0_OR_GREATER
[NotNullWhen(false)]
#endif
this string? str)
Expand All @@ -68,7 +68,7 @@ public static bool IsNullOrEmpty(
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool NotNullOrEmpty(
#if (NET6_0 || NET7_0)
#if NET6_0_OR_GREATER
[NotNullWhen(true)]
#endif
this string? str)
Expand Down

0 comments on commit 804c091

Please sign in to comment.