Skip to content

Commit

Permalink
Better code condition
Browse files Browse the repository at this point in the history
  • Loading branch information
imperugo committed Dec 25, 2023
1 parent 7294af4 commit 8ad186b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Task<bool> HashExistsAsync(string hashKey, string key, CommandFlags comma
/// <inheritdoc/>
public async Task<IDictionary<string, T?>> HashGetAsync<T>(string hashKey, string[] keys, CommandFlags commandFlags = CommandFlags.None)
{
#if NET8_0 || NET7_0 || NET6_0
#if NET6_0_OR_GREATER
var concurrent = new ConcurrentDictionary<string, T?>();

await Parallel.ForEachAsync(keys, async (key, _) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

#if NET8_0 || NET7_0
#if NET7_0_OR_GREATER
using MemoryPack;
#endif

namespace StackExchange.Redis.Extensions.Tests.Helpers;

[Serializable]
[DataContract]
#if NET8_0 || NET7_0
#if NET7_0_OR_GREATER
[MemoryPackable]
public partial class ComplexClassForTest<T, TK> : IEquatable<ComplexClassForTest<T, TK>>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

#if NET8_0 || NET7_0
#if NET7_0_OR_GREATER
using MemoryPack;
#endif

namespace StackExchange.Redis.Extensions.Tests.Helpers;

[Serializable]
[DataContract]
#if NET8_0 || NET7_0
#if NET7_0_OR_GREATER
[MemoryPackable]
public partial class TestClass<T> : IEquatable<TestClass<T>>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Ugo Lattanzi. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.

#if NET8_0 || NET7_0
#if NET7_0_OR_GREATER
using StackExchange.Redis.Extensions.MemoryPack;

namespace StackExchange.Redis.Extensions.Core.Tests.Serializers;
Expand Down

0 comments on commit 8ad186b

Please sign in to comment.