Skip to content

Commit 437636b

Browse files
committed
Merge branch 'release/10.0.0'
2 parents 2af576d + eb1264e commit 437636b

File tree

49 files changed

+2931
-607
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2931
-607
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"isRoot": true,
44
"tools": {
55
"gitversion.tool": {
6-
"version": "6.0.2",
6+
"version": "6.1.0",
77
"commands": [
88
"dotnet-gitversion"
9-
]
9+
],
10+
"rollForward": false
1011
}
1112
}
1213
}

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# NEventStore.Persistence.Sql
22

3+
## 10.0.0
4+
5+
- Async methods [#51](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/51)
6+
- Updated NEventStore to 10.0.0
7+
8+
### Breaking Changes
9+
10+
- `ISerializeEvents.SerializeEventMessages()` signature changed to accept `IEnumerable` instead of `IReadOnlyList`.
11+
312
## 9.3.1
413

514
- Added a dedicated `ISerializeEvents` interface that allows customizing event deserialization with access to metadata from the `ICommit` class. [#47](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/47), [#49](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/49), [#506](https://github.com/NEventStore/NEventStore/issues/506)

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dotnet tool run dotnet-gitversion ".\dependencies\NEventStore" /updateAssemblyIn
2525

2626
# Build
2727
Write-Host "Building: "$nugetversion" "$configuration
28-
dotnet build ./src/NEventStore.Persistence.Sql.Core.sln -c $configuration --no-restore
28+
dotnet build ./src/NEventStore.Persistence.Sql.Core.sln -c $configuration --no-restore /p:ContinuousIntegrationBuild=true
2929

3030
# Testing
3131
if ($runtests -eq "y") {

dependencies/NEventStore

Submodule NEventStore updated 179 files

src/.nuget/NEventStore.Persistence.Sql.nuspec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
-->
2727
<dependencies>
2828
<group targetFramework=".NETFramework4.6.2">
29-
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
30-
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
29+
<dependency id="NEventStore" version="[10.0.0,11.0.0)" exclude="Build,Analyzers"/>
3130
<dependency id="Microsoft.Data.SqlClient" version="5.2.2" exclude="Build,Analyzers" />
3231
</group>
3332
<group targetFramework=".NETStandard2.0">
34-
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
35-
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
33+
<dependency id="NEventStore" version="[10.0.0,11.0.0)" exclude="Build,Analyzers"/>
3634
<dependency id="Microsoft.Data.SqlClient" version="5.2.2" exclude="Build,Analyzers" />
3735
</group>
3836
</dependencies>

src/Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<PropertyGroup>
3+
<LangVersion>13.0</LangVersion>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
</PropertyGroup>
7+
</Project>

src/NEventStore.Persistence.MsSql.Tests/NEventStore.Persistence.MsSql.Core.Tests.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net472</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<AssemblyName>NEventStore.Persistence.MsSql.Tests</AssemblyName>
@@ -16,18 +16,19 @@
1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
1818
</ItemGroup>
19-
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
19+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
2020
<Reference Include="System.Transactions" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="FluentAssertions" Version="6.12.2" />
23+
<PackageReference Include="FluentAssertions" Version="7.0.0" />
2424
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
25-
<PackageReference Include="NUnit" Version="3.13.3" />
25+
<PackageReference Include="NUnit" Version="4.3.2" />
2626
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
2727
</ItemGroup>
2828

2929
<ItemGroup>
3030
<ProjectReference Include="..\..\dependencies\NEventStore\src\NEventStore.Persistence.AcceptanceTests\NEventStore.Persistence.AcceptanceTests.Core.csproj" />
31+
<ProjectReference Include="..\..\dependencies\NEventStore\src\NEventStore.Serialization.Binary\NEventStore.Serialization.Binary.Core.csproj" />
3132
<ProjectReference Include="..\..\dependencies\NEventStore\src\NEventStore\NEventStore.Core.csproj" />
3233
<ProjectReference Include="..\NEventStore.Persistence.Sql.Tests\NEventStore.Persistence.Sql.Core.Tests.csproj" />
3334
<ProjectReference Include="..\NEventStore.Persistence.Sql\NEventStore.Persistence.Sql.Core.csproj" />
@@ -43,7 +44,9 @@
4344

4445
<ItemGroup>
4546
<Compile Include="..\..\dependencies\NEventStore\src\NEventStore.Persistence.AcceptanceTests\PersistenceTests.cs" Link="PersistenceTests.cs" />
47+
<Compile Include="..\..\dependencies\NEventStore\src\NEventStore.Persistence.AcceptanceTests\PersistenceTests.Async.cs" Link="PersistenceTests.Async.cs" />
4648
<Compile Include="..\NEventStore.Persistence.Sql.Tests\PersistenceTests.Transactions.cs" Link="PersistenceTests.Transactions.cs" />
49+
<Compile Include="..\NEventStore.Persistence.Sql.Tests\PersistenceTests.Transactions.Async.cs" Link="PersistenceTests.Transactions.Async.cs" />
4750
</ItemGroup>
4851

4952
<ItemGroup>

src/NEventStore.Persistence.MsSql.Tests/PersistenceEngineFixture.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using Microsoft.Data.SqlClient;
22
using NEventStore.Persistence.Sql.Tests;
3+
using NEventStore.Persistence.Sql;
4+
using NEventStore.Persistence.Sql.SqlDialects;
5+
using NEventStore.Serialization.Binary;
6+
using System.Transactions;
37

48
namespace NEventStore.Persistence.AcceptanceTests
59
{
6-
using NEventStore.Persistence.Sql;
7-
using NEventStore.Persistence.Sql.SqlDialects;
8-
using NEventStore.Serialization;
9-
using System.Transactions;
10-
1110
public partial class PersistenceEngineFixture
1211
{
1312
/// <summary>
@@ -19,17 +18,19 @@ public partial class PersistenceEngineFixture
1918

2019
public PersistenceEngineFixture()
2120
{
21+
#if NET8_0_OR_GREATER
22+
AppContext.SetSwitch("System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization", true);
23+
#endif
2224
_createPersistence = pageSize =>
2325
{
2426
var serializer = new BinarySerializer();
2527
return new SqlPersistenceFactory(
26-
new EnviromentConnectionFactory("MsSql", SqlClientFactory.Instance),
28+
new EnvironmentConnectionFactory("MsSql", SqlClientFactory.Instance),
2729
serializer,
2830
new DefaultEventSerializer(serializer),
2931
new MsSqlDialect(),
30-
pageSize: pageSize,
31-
scopeOption: ScopeOption
32-
).Build();
32+
scopeOption: ScopeOption,
33+
pageSize: pageSize).Build();
3334
};
3435
}
3536
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Microsoft.Data.SqlClient;
2+
using NEventStore.Persistence.Sql.Tests;
3+
using NEventStore.Persistence.Sql;
4+
using NEventStore.Persistence.Sql.SqlDialects;
5+
using NEventStore.Serialization.Binary;
6+
using System.Transactions;
7+
8+
namespace NEventStore.Persistence.AcceptanceTests.Async
9+
{
10+
public partial class PersistenceEngineFixtureAsync
11+
{
12+
/// <summary>
13+
/// this mimic the current NEventStore default values which is run outside any transaction (creates a scope that
14+
/// suppresses any transaction)
15+
/// </summary>
16+
public TransactionScopeOption? ScopeOption { get; set; } =
17+
null; // the old default: TransactionScopeOption.Suppress;
18+
19+
public PersistenceEngineFixtureAsync()
20+
{
21+
#if NET8_0_OR_GREATER
22+
AppContext.SetSwitch("System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization", true);
23+
#endif
24+
_createPersistence = pageSize =>
25+
{
26+
var serializer = new BinarySerializer();
27+
return new SqlPersistenceFactory(
28+
new EnvironmentConnectionFactory("MsSql", SqlClientFactory.Instance),
29+
serializer,
30+
new DefaultEventSerializer(serializer),
31+
new MsSqlDialect(),
32+
scopeOption: ScopeOption,
33+
pageSize: pageSize).Build();
34+
};
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)