Skip to content

Commit ad159ed

Browse files
authored
Merge branch 'master' into dependabot/nuget/BouncyCastle.Cryptography-2.3.0
2 parents 01f1db2 + e5ae8cd commit ad159ed

File tree

6 files changed

+712
-18
lines changed

6 files changed

+712
-18
lines changed

src/NRedisStack/Auxiliary.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,28 @@ public static IDatabase GetDatabase(this ConnectionMultiplexer redis,
4848
return _db;
4949
}
5050

51-
private static void SetInfoInPipeline(this IDatabase db)
51+
internal static void SetInfoInPipeline(this IDatabase db)
5252
{
53-
if (_libraryName == null) return;
54-
Pipeline pipeline = new Pipeline(db);
55-
_ = pipeline.Db.ClientSetInfoAsync(SetInfoAttr.LibraryName, _libraryName!);
56-
_ = pipeline.Db.ClientSetInfoAsync(SetInfoAttr.LibraryVersion, GetNRedisStackVersion());
57-
pipeline.Execute();
53+
if (_setInfo)
54+
{
55+
_setInfo = false;
56+
if (_libraryName == null) return;
57+
Pipeline pipeline = new Pipeline(db);
58+
_ = pipeline.Db.ClientSetInfoAsync(SetInfoAttr.LibraryName, _libraryName!);
59+
_ = pipeline.Db.ClientSetInfoAsync(SetInfoAttr.LibraryVersion, GetNRedisStackVersion());
60+
pipeline.Execute();
61+
}
5862
}
5963

6064
public static RedisResult Execute(this IDatabase db, SerializedCommand command)
6165
{
62-
if (!_setInfo) return db.Execute(command.Command, command.Args);
63-
_setInfo = false;
6466
db.SetInfoInPipeline();
6567
return db.Execute(command.Command, command.Args);
6668
}
6769

6870
public static async Task<RedisResult> ExecuteAsync(this IDatabaseAsync db, SerializedCommand command)
6971
{
70-
if (_setInfo)
71-
{
72-
_setInfo = false;
73-
((IDatabase)db).SetInfoInPipeline();
74-
}
72+
((IDatabase)db).SetInfoInPipeline();
7573
return await db.ExecuteAsync(command.Command, command.Args);
7674
}
7775

src/NRedisStack/NRedisStack.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ItemGroup>
1919
<PackageReference Include="NetTopologySuite" Version="2.5.0" />
2020
<PackageReference Include="System.Text.Json" Version="7.0.2" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
21-
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
21+
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
2222
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
2323
</ItemGroup>
2424

src/NRedisStack/Transactions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class Transaction
99

1010
public Transaction(IDatabase db)
1111
{
12+
db.SetInfoInPipeline();
1213
_transaction = db.CreateTransaction();
1314
}
1415

tests/Doc/Doc.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
<PrivateAssets>all</PrivateAssets>
1818
</PackageReference>
19-
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
19+
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
2020
</ItemGroup>
2121
<ItemGroup>
2222
<ProjectReference Include="..\..\src\NRedisStack\NRedisStack.csproj" />

0 commit comments

Comments
 (0)