Skip to content

Commit f8b7a68

Browse files
authored
implement dual targetting for both netstandard2.0 and net60 (#512)
1 parent c805144 commit f8b7a68

File tree

15 files changed

+12
-16
lines changed

15 files changed

+12
-16
lines changed

src/Akka.Persistence.Sql.Data.Compatibility.Tests/Akka.Persistence.Sql.Data.Compatibility.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
<PackageReference Include="System.Data.SQLite" />
2525

26-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
2726
<PackageReference Include="Microsoft.Extensions.Hosting" />
2827
<PackageReference Include="xunit" />
2928
<PackageReference Include="xunit.runner.visualstudio">

src/Akka.Persistence.Sql.Data.Compatibility.Tests/DataCompatibilitySpecBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected Configuration.Config Config()
137137
}}")
138138
.WithFallback(SqlPersistence.DefaultConfiguration)
139139
.WithFallback(ClusterSharding.DefaultConfig())
140-
.WithFallback(ClusterSingletonManager.DefaultConfig());
140+
.WithFallback(ClusterSingleton.DefaultConfig());
141141

142142
protected virtual Task InitializeTestAsync()
143143
=> Task.CompletedTask;

src/Akka.Persistence.Sql.Hosting/Akka.Persistence.Sql.Hosting.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
4+
<TargetFrameworks>$(NetStandardLibVersion);$(NetLibVersion)</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

src/Akka.Persistence.Sql.TagTableMigration/Akka.Persistence.Sql.TagTableMigration.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<ItemGroup>
1010
<PackageReference Include="System.CommandLine" />
1111
<PackageReference Include="Microsoft.Data.SqlClient" />
12-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
1312
</ItemGroup>
1413

1514
<ItemGroup>

src/Akka.Persistence.Sql/Akka.Persistence.Sql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>An Akka Persistence Module for SQL Databases using Linq2Db.</Description>
4-
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
4+
<TargetFrameworks>$(NetStandardLibVersion);$(NetLibVersion)</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

src/Akka.Persistence.Sql/Config/EventJournalTableConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public EventJournalTableConfig(Configuration.Config config)
2424

2525
public JournalTableColumnNames ColumnNames { get; }
2626

27-
public bool Equals(EventJournalTableConfig other)
27+
public bool Equals(EventJournalTableConfig? other)
2828
{
2929
if (ReferenceEquals(null, other))
3030
return false;

src/Akka.Persistence.Sql/Config/JournalTableConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public JournalTableConfig(Configuration.Config config)
4848
// ReSharper disable once InconsistentNaming
4949
public TagTableConfig TagTable { get; }
5050

51-
public bool Equals(JournalTableConfig other)
51+
public bool Equals(JournalTableConfig? other)
5252
{
5353
if (ReferenceEquals(null, other))
5454
return false;

src/Akka.Persistence.Sql/Config/MultiDataOptionsSetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public sealed class MultiDataOptionsSetup: Setup
1717
public void AddDataOptions(string pluginId, DataOptions dataOptions)
1818
=> _options[pluginId] = dataOptions;
1919

20-
public bool TryGetDataOptionsFor(string pluginId, out DataOptions dataOptions)
20+
public bool TryGetDataOptionsFor(string pluginId, out DataOptions? dataOptions)
2121
=> _options.TryGetValue(pluginId, out dataOptions);
2222

2323
public void RemoveDataOptionsFor(string pluginId)

src/Akka.Persistence.Sql/Journal/SqlWriteJournal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public SqlWriteJournal(Configuration.Config journalConfig)
7171
{
7272
var multiSetup = setup.Get<MultiDataOptionsSetup>();
7373
if (multiSetup.HasValue && multiSetup.Value.TryGetDataOptionsFor(_journalConfig.PluginId, out var dataOptions))
74-
_journalConfig = _journalConfig.WithDataOptions(dataOptions);
74+
_journalConfig = _journalConfig.WithDataOptions(dataOptions!);
7575
}
7676

7777
_useWriterUuid = _journalConfig.TableConfig.EventJournalTable.UseWriterUuidColumn;

src/Akka.Persistence.Sql/Query/Dao/BaseByteReadArrayJournalDao.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private static async Task<List<JournalRow>> AddTagDataFromTagTableAsync(IQueryab
323323
var result = new List<JournalRow>();
324324
foreach (var rowAndTags in rowsAndTags)
325325
{
326-
rowAndTags.row.TagArray = rowAndTags.tags?.Split([';'], StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
326+
rowAndTags.row.TagArray = rowAndTags.tags?.Split(new []{';'}, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
327327
result.Add(rowAndTags.row);
328328
}
329329

0 commit comments

Comments
 (0)