Skip to content

chore: go net8 #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:7.0
container: mcr.microsoft.com/dotnet/sdk:8.0

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3.0.3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7'
dotnet-version: '8'
- name: Nuget Push
env:
nuget_key: ${{ secrets.NUGETAPIKEY }}
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>Cnblogs</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<ItemGroup>
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// <typeparam name="TError">The error type for this handler.</typeparam>
public interface ICommandHandler<TCommand, TView, TError> : IRequestHandler<TCommand, CommandResponse<TView, TError>>
where TCommand : ICommand<TView, TError>
where TError : Enumeration
{
}
where TError : Enumeration;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// <typeparam name="TError">The error type for this handler.</typeparam>
public interface ICommandHandler<TCommand, TError> : IRequestHandler<TCommand, CommandResponse<TError>>
where TCommand : ICommand<TError>
where TError : Enumeration
{
}
where TError : Enumeration;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// </summary>
/// <typeparam name="TDomainEvent">The domain event type for this handler to handle.</typeparam>
public interface IDomainEventHandler<TDomainEvent> : INotificationHandler<TDomainEvent>
where TDomainEvent : DomainEvent
{
}
where TDomainEvent : DomainEvent;
4 changes: 1 addition & 3 deletions src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IListQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// Represents a query returns a list of items.
/// </summary>
/// <typeparam name="TList">The list to return, usually a <see cref="List{T}"/>.</typeparam>
public interface IListQuery<TList> : IRequest<TList>
{
}
public interface IListQuery<TList> : IRequest<TList>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// <typeparam name="TQuery">The <see cref="IListQuery{TList}" /> been handled.</typeparam>
/// <typeparam name="TList">The result type of <typeparamref name="TQuery"/>.</typeparam>
public interface IListQueryHandler<TQuery, TList> : IRequestHandler<TQuery, TList>
where TQuery : IListQuery<TList>
{
}
where TQuery : IListQuery<TList>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// <typeparam name="TQuery">The <see cref="IPageableQuery{TElement}" /> to handle.</typeparam>
/// <typeparam name="TView">The type for each item in <see cref="PagedList{T}"/>.</typeparam>
public interface IPageableQueryHandler<TQuery, TView> : IListQueryHandler<TQuery, PagedList<TView>>
where TQuery : IPageableQuery<TView>
{
}
where TQuery : IPageableQuery<TView>;
4 changes: 1 addition & 3 deletions src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/IQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// Represents query for single item.
/// </summary>
/// <typeparam name="TView">The type of item to query.</typeparam>
public interface IQuery<TView> : IRequest<TView?>
{
}
public interface IQuery<TView> : IRequest<TView?>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ namespace Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
/// <typeparam name="TQuery">The <see cref="IQuery{TView}" /> type to handle.</typeparam>
/// <typeparam name="TView">The type of item to query.</typeparam>
public interface IQueryHandler<TQuery, TView> : IRequestHandler<TQuery, TView?>
where TQuery : IQuery<TView>
{
}
where TQuery : IQuery<TView>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cnblogs.Architecture.Ddd.Cqrs.Abstractions\Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ProjectReference Include="..\Cnblogs.Architecture.Ddd.Cqrs.DependencyInjection\Cnblogs.Architecture.Ddd.Cqrs.DependencyInjection.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.12" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
/// <summary>
/// 聚合根标记。
/// </summary>
public interface IAggregateRoot
{
}
public interface IAggregateRoot;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ namespace Cnblogs.Architecture.Ddd.Domain.Abstractions;
/// <summary>
/// 领域事件标记。
/// </summary>
public interface IDomainEvent : INotification
{
}
public interface IDomainEvent : INotification;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ namespace Cnblogs.Architecture.Ddd.EventBus.Abstractions;
/// <summary>
/// The empty interface as a generic type constraint
/// </summary>
public interface IEventBusRequestHandler
{
}
public interface IEventBusRequestHandler;
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ namespace Cnblogs.Architecture.Ddd.EventBus.Abstractions;
/// </summary>
/// <typeparam name="TEvent">集成事件。</typeparam>
public interface IIntegrationEventHandler<TEvent> : INotificationHandler<TEvent>, IEventBusRequestHandler
where TEvent : IntegrationEvent
{
}
where TEvent : IntegrationEvent;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
/// <summary>
/// 本地缓存提供器,<see cref="ICacheProvider" /> 的一个别名。
/// </summary>
public interface ILocalCacheProvider : ICacheProvider
{
}
public interface ILocalCacheProvider : ICacheProvider;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
/// <summary>
/// 远程缓存提供器,<see cref="ICacheProvider" /> 的一个别名。
/// </summary>
public interface IRemoteCacheProvider : ICacheProvider
{
}
public interface IRemoteCacheProvider : ICacheProvider;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ public async Task BulkWriteAsync<T>(IEnumerable<T> entities)

using var bulkCopyInterface = new ClickHouseBulkCopy(_options.ConnectionString)
{
DestinationTableName = configuration.TableName
DestinationTableName = configuration.TableName,
ColumnNames = configuration.ColumnNames
};

var objs = entities.Select(x => configuration.ToObjectArray(x));
await bulkCopyInterface.WriteToServerAsync(objs, configuration.ColumnNames);
await bulkCopyInterface.InitAsync();
await bulkCopyInterface.WriteToServerAsync(objs);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ClickHouse.Client" Version="6.7.5" />
<PackageReference Include="ClickHouse.Client" Version="6.8.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.15" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Dapper" Version="2.1.21" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
Please check release notes at: https://github.com/cnblogs/Architecture/releases
</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>
4 changes: 1 addition & 3 deletions test/Cnblogs.Architecture.IntegrationTestProject/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@
namespace Cnblogs.Architecture.IntegrationTestProject
{
// ReSharper disable once PartialTypeWithSinglePart
public partial class Program
{
}
public partial class Program;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Cnblogs.Serilog.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.12" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -26,7 +26,7 @@
<ItemGroup>
<PackageReference Include="Serilog.Sinks.InMemory" Version="0.11.0" />
<PackageReference Include="Serilog.Sinks.InMemory.Assertions" Version="0.11.0" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@

namespace Cnblogs.Architecture.IntegrationTests;

public class IntegrationTestFactory : WebApplicationFactory<Program>
{
}
public class IntegrationTestFactory : WebApplicationFactory<Program>;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down