Skip to content

Commit 19962e3

Browse files
authored
Merge pull request #175 from cnblogs/go-net8
chore: go net8
2 parents cf2eaa0 + 589c9c3 commit 19962e3

File tree

30 files changed

+41
-71
lines changed

30 files changed

+41
-71
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
container: mcr.microsoft.com/dotnet/sdk:7.0
12+
container: mcr.microsoft.com/dotnet/sdk:8.0
1313

1414
steps:
1515
- name: Checkout

.github/workflows/pack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- uses: actions/setup-dotnet@v3.0.3
14+
- uses: actions/setup-dotnet@v3
1515
with:
16-
dotnet-version: '7'
16+
dotnet-version: '8'
1717
- name: Nuget Push
1818
env:
1919
nuget_key: ${{ secrets.NUGETAPIKEY }}

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Authors>Cnblogs</Authors>

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Mapster" Version="7.4.0" />
19-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
20-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
19+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
20+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
2121
</ItemGroup>
2222

2323
</Project>

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/ICommandHandler.Generic.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
1212
/// <typeparam name="TError">The error type for this handler.</typeparam>
1313
public interface ICommandHandler<TCommand, TView, TError> : IRequestHandler<TCommand, CommandResponse<TView, TError>>
1414
where TCommand : ICommand<TView, TError>
15-
where TError : Enumeration
16-
{
17-
}
15+
where TError : Enumeration;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/ICommandHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
1111
/// <typeparam name="TError">The error type for this handler.</typeparam>
1212
public interface ICommandHandler<TCommand, TError> : IRequestHandler<TCommand, CommandResponse<TError>>
1313
where TCommand : ICommand<TError>
14-
where TError : Enumeration
15-
{
16-
}
14+
where TError : Enumeration;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IDomainEventHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
99
/// </summary>
1010
/// <typeparam name="TDomainEvent">The domain event type for this handler to handle.</typeparam>
1111
public interface IDomainEventHandler<TDomainEvent> : INotificationHandler<TDomainEvent>
12-
where TDomainEvent : DomainEvent
13-
{
14-
}
12+
where TDomainEvent : DomainEvent;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IListQuery.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
66
/// Represents a query returns a list of items.
77
/// </summary>
88
/// <typeparam name="TList">The list to return, usually a <see cref="List{T}"/>.</typeparam>
9-
public interface IListQuery<TList> : IRequest<TList>
10-
{
11-
}
9+
public interface IListQuery<TList> : IRequest<TList>;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IListQueryHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
88
/// <typeparam name="TQuery">The <see cref="IListQuery{TList}" /> been handled.</typeparam>
99
/// <typeparam name="TList">The result type of <typeparamref name="TQuery"/>.</typeparam>
1010
public interface IListQueryHandler<TQuery, TList> : IRequestHandler<TQuery, TList>
11-
where TQuery : IListQuery<TList>
12-
{
13-
}
11+
where TQuery : IListQuery<TList>;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IPageableQueryHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
88
/// <typeparam name="TQuery">The <see cref="IPageableQuery{TElement}" /> to handle.</typeparam>
99
/// <typeparam name="TView">The type for each item in <see cref="PagedList{T}"/>.</typeparam>
1010
public interface IPageableQueryHandler<TQuery, TView> : IListQueryHandler<TQuery, PagedList<TView>>
11-
where TQuery : IPageableQuery<TView>
12-
{
13-
}
11+
where TQuery : IPageableQuery<TView>;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IQuery.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
66
/// Represents query for single item.
77
/// </summary>
88
/// <typeparam name="TView">The type of item to query.</typeparam>
9-
public interface IQuery<TView> : IRequest<TView?>
10-
{
11-
}
9+
public interface IQuery<TView> : IRequest<TView?>;

src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IQueryHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
88
/// <typeparam name="TQuery">The <see cref="IQuery{TView}" /> type to handle.</typeparam>
99
/// <typeparam name="TView">The type of item to query.</typeparam>
1010
public interface IQueryHandler<TQuery, TView> : IRequestHandler<TQuery, TView?>
11-
where TQuery : IQuery<TView>
12-
{
13-
}
11+
where TQuery : IQuery<TView>;

src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.1.0" />
11-
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
11+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
1212
</ItemGroup>
1313
<ItemGroup>
1414
<ProjectReference Include="..\Cnblogs.Architecture.Ddd.Cqrs.Abstractions\Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj" />

src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ProjectReference Include="..\Cnblogs.Architecture.Ddd.Cqrs.DependencyInjection\Cnblogs.Architecture.Ddd.Cqrs.DependencyInjection.csproj" />
99
</ItemGroup>
1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.12" />
11+
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
1313
</ItemGroup>
1414
</Project>

src/Cnblogs.Architecture.Ddd.Domain.Abstractions/IAggregateRoot.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
/// <summary>
44
/// 聚合根标记。
55
/// </summary>
6-
public interface IAggregateRoot
7-
{
8-
}
6+
public interface IAggregateRoot;

src/Cnblogs.Architecture.Ddd.Domain.Abstractions/IDomainEvent.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ namespace Cnblogs.Architecture.Ddd.Domain.Abstractions;
55
/// <summary>
66
/// 领域事件标记。
77
/// </summary>
8-
public interface IDomainEvent : INotification
9-
{
10-
}
8+
public interface IDomainEvent : INotification;

src/Cnblogs.Architecture.Ddd.EventBus.Abstractions/IEventBusRequestHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ namespace Cnblogs.Architecture.Ddd.EventBus.Abstractions;
33
/// <summary>
44
/// The empty interface as a generic type constraint
55
/// </summary>
6-
public interface IEventBusRequestHandler
7-
{
8-
}
6+
public interface IEventBusRequestHandler;

src/Cnblogs.Architecture.Ddd.EventBus.Abstractions/IIntegrationEventHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ namespace Cnblogs.Architecture.Ddd.EventBus.Abstractions;
77
/// </summary>
88
/// <typeparam name="TEvent">集成事件。</typeparam>
99
public interface IIntegrationEventHandler<TEvent> : INotificationHandler<TEvent>, IEventBusRequestHandler
10-
where TEvent : IntegrationEvent
11-
{
12-
}
10+
where TEvent : IntegrationEvent;

src/Cnblogs.Architecture.Ddd.Infrastructure.Abstractions/ILocalCacheProvider.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
/// <summary>
44
/// 本地缓存提供器,<see cref="ICacheProvider" /> 的一个别名。
55
/// </summary>
6-
public interface ILocalCacheProvider : ICacheProvider
7-
{
8-
}
6+
public interface ILocalCacheProvider : ICacheProvider;

src/Cnblogs.Architecture.Ddd.Infrastructure.Abstractions/IRemoteCacheProvider.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
/// <summary>
44
/// 远程缓存提供器,<see cref="ICacheProvider" /> 的一个别名。
55
/// </summary>
6-
public interface IRemoteCacheProvider : ICacheProvider
7-
{
8-
}
6+
public interface IRemoteCacheProvider : ICacheProvider;

src/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
1616
</ItemGroup>
1717

1818
</Project>

src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.Clickhouse/ClickhouseDapperContext.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ public async Task BulkWriteAsync<T>(IEnumerable<T> entities)
5757

5858
using var bulkCopyInterface = new ClickHouseBulkCopy(_options.ConnectionString)
5959
{
60-
DestinationTableName = configuration.TableName
60+
DestinationTableName = configuration.TableName,
61+
ColumnNames = configuration.ColumnNames
6162
};
6263

6364
var objs = entities.Select(x => configuration.ToObjectArray(x));
64-
await bulkCopyInterface.WriteToServerAsync(objs, configuration.ColumnNames);
65+
await bulkCopyInterface.InitAsync();
66+
await bulkCopyInterface.WriteToServerAsync(objs);
6567
}
6668
}

src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.Clickhouse/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.Clickhouse.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="ClickHouse.Client" Version="6.7.5" />
16+
<PackageReference Include="ClickHouse.Client" Version="6.8.1" />
1717
</ItemGroup>
1818

1919
</Project>

src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Dapper" Version="2.1.15" />
13-
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
12+
<PackageReference Include="Dapper" Version="2.1.21" />
13+
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
1414
</ItemGroup>
1515

1616
</Project>

src/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.13" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
Please check release notes at: https://github.com/cnblogs/Architecture/releases
1212
</PackageReleaseNotes>
1313
</PropertyGroup>
14-
14+
1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
16+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
1717
</ItemGroup>
1818

1919
</Project>

test/Cnblogs.Architecture.IntegrationTestProject/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,5 @@
5555
namespace Cnblogs.Architecture.IntegrationTestProject
5656
{
5757
// ReSharper disable once PartialTypeWithSinglePart
58-
public partial class Program
59-
{
60-
}
58+
public partial class Program;
6159
}

test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<ItemGroup>
33
<PackageReference Include="Cnblogs.Serilog.Extensions" Version="1.1.0" />
4-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.12" />
5-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
4+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
5+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
66
<PackageReference Include="xunit" Version="2.6.1" />
77
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
88
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -26,7 +26,7 @@
2626
<ItemGroup>
2727
<PackageReference Include="Serilog.Sinks.InMemory" Version="0.11.0" />
2828
<PackageReference Include="Serilog.Sinks.InMemory.Assertions" Version="0.11.0" />
29-
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
29+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

test/Cnblogs.Architecture.IntegrationTests/IntegrationTestFactory.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33

44
namespace Cnblogs.Architecture.IntegrationTests;
55

6-
public class IntegrationTestFactory : WebApplicationFactory<Program>
7-
{
8-
}
6+
public class IntegrationTestFactory : WebApplicationFactory<Program>;

test/Cnblogs.Architecture.UnitTests/Cnblogs.Architecture.UnitTests.csproj

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

33
<ItemGroup>
4-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.13" />
5-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
4+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
5+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
66
<PackageReference Include="xunit" Version="2.6.1" />
77
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
88
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)