Skip to content

Commit b843f75

Browse files
committed
feat: 移除目标框架 net7.0, 添加目标框架net9.0, net10.0支持;
1 parent 115dacd commit b843f75

26 files changed

+310
-313
lines changed

.editorconfig

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ end_of_line = crlf
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10-
dotnet_style_qualification_for_field = false:silent
11-
dotnet_style_qualification_for_property = false:silent
12-
dotnet_style_qualification_for_method = false:silent
13-
dotnet_style_qualification_for_event = false:silent
14-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
15-
indent_size = 4
16-
tab_width = 4
17-
dotnet_style_operator_placement_when_wrapping = beginning_of_line
10+
indent_size = 2
11+
tab_width = 2
1812

1913
# c# 文件
2014
[*.cs]
@@ -119,6 +113,7 @@ csharp_style_prefer_readonly_struct = true
119113
# 代码块首选项
120114
csharp_prefer_braces = true:silent
121115
csharp_prefer_simple_using_statement = true:suggestion
116+
csharp_prefer_system_threading_lock = true:suggestion
122117
csharp_style_namespace_declarations = file_scoped:suggestion
123118
csharp_style_prefer_method_group_conversion = true:silent
124119
csharp_style_prefer_top_level_statements = true:silent
@@ -134,6 +129,7 @@ csharp_style_prefer_null_check_over_type_check = true
134129
csharp_style_prefer_range_operator = true
135130
csharp_style_prefer_tuple_swap = true
136131
csharp_style_prefer_utf8_string_literals = true
132+
csharp_style_prefer_primary_constructors = true:suggestion
137133
csharp_style_throw_expression = true
138134
csharp_style_unused_value_assignment_preference = discard_variable
139135
csharp_style_unused_value_expression_statement_preference = discard_variable
@@ -300,11 +296,3 @@ dotnet_naming_style.以_为前缀.required_prefix = _
300296
dotnet_naming_style.以_为前缀.required_suffix =
301297
dotnet_naming_style.以_为前缀.word_separator =
302298
dotnet_naming_style.以_为前缀.capitalization = camel_case
303-
304-
[*.csproj]
305-
indent_size = 2
306-
tab_width = 2
307-
308-
[*.props]
309-
indent_size = 2
310-
tab_width = 2
Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Nuget Package
1+
name: Publish Nuget Package
22

33
on:
44
release:
@@ -10,17 +10,34 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13+
permissions:
14+
id-token: write
15+
1316
steps:
14-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1518
- name: Setup .NET Core SDK
16-
uses: actions/setup-dotnet@v3
19+
uses: actions/setup-dotnet@v5
1720
with:
18-
dotnet-version: '8.0.x'
21+
dotnet-version: |
22+
8.x
23+
9.x
24+
10.x
25+
- name: restore dependencies
26+
run: dotnet restore
1927
- name: build
20-
run: dotnet build -c Release
28+
run: dotnet build --no-restore -c Release
29+
- name: test
30+
run: dotnet test --no-restore -c Release
2131
- name: pack
22-
run: dotnet pack -c Release -o ./output
32+
run: dotnet pack -c Release -o ./output --include-symbols
33+
34+
- name: NuGet login
35+
uses: NuGet/login@v1
36+
id: login
37+
with:
38+
user: ${{ secrets.NUGET_USER }}
39+
2340
- name: push package
2441
shell: pwsh
2542
working-directory: ./output
26-
run: Get-ChildItem -File -Filter '*.nupkg' | ForEach-Object { dotnet nuget push $_ -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --no-service-endpoint --skip-duplicate; dotnet nuget push $_ -k ${{secrets.NUGET_GITHUB_KEY}} -s https://nuget.pkg.github.com/StratosBlue/index.json --no-service-endpoint --skip-duplicate; }
43+
run: Get-ChildItem -File -Filter '*.nupkg' | ForEach-Object { dotnet nuget push $_ -k ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --no-service-endpoint --skip-duplicate; dotnet nuget push $_ -k ${{secrets.NUGET_GITHUB_KEY}} -s https://nuget.pkg.github.com/StratosBlue/index.json --no-service-endpoint --skip-duplicate; }

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Ignore Visual Studio temporary files, build results, and
1+
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
44
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
@@ -360,4 +360,4 @@ MigrationBackup/
360360
.ionide/
361361

362362
# Fody - auto-generated XML schema
363-
FodyWeavers.xsd
363+
FodyWeavers.xsd

Cuture.EntityFramework.DynamicFilter.sln

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Solution>
2+
<Folder Name="/benchmark/">
3+
<Project Path="benchmark/Cuture.EntityFramework.DynamicFilter.Benchmark/Cuture.EntityFramework.DynamicFilter.Benchmark.csproj" />
4+
</Folder>
5+
<Folder Name="/solution items/">
6+
<File Path=".editorconfig" />
7+
<File Path=".gitattributes" />
8+
<File Path=".gitignore" />
9+
<File Path="CodeMaid.config" />
10+
<File Path="Directory.Build.props" />
11+
<File Path="global.json" />
12+
<File Path="LICENSE.txt" />
13+
<File Path="README.md" />
14+
</Folder>
15+
<Folder Name="/solution items/.github/" />
16+
<Folder Name="/solution items/.github/workflows/">
17+
<File Path=".github/workflows/PublishNugetPackage.yml" />
18+
</Folder>
19+
<Folder Name="/src/">
20+
<Project Path="src/Cuture.EntityFramework.DynamicFilter/Cuture.EntityFramework.DynamicFilter.csproj" />
21+
</Folder>
22+
<Folder Name="/test/">
23+
<Project Path="test/Cuture.EntityFramework.DynamicFilter.Test/Cuture.EntityFramework.DynamicFilter.Test.csproj" />
24+
</Folder>
25+
</Solution>

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
44

55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<PropertyGroup>
15-
<Version>1.0.0-preview-002</Version>
15+
<Version>1.0.0-preview-003</Version>
1616

1717
<Description>An extension library for `EntityFrameworkCore` to support dynamic global filters. 一个 `EntityFrameworkCore` 的拓展库,用于支持动态的全局过滤器。</Description>
1818

@@ -28,7 +28,7 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup Condition="'$(Configuration)' == 'Release'">
31-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.*" PrivateAssets="All" />
31+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.*" PrivateAssets="All" />
3232
</ItemGroup>
3333

3434
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 stratos
3+
Copyright (c) 2026 stratos
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

benchmark/Cuture.EntityFramework.DynamicFilter.Benchmark/Cuture.EntityFramework.DynamicFilter.Benchmark.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net7.0</TargetFrameworks>
5+
<TargetFrameworks>net10.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

global.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"msbuild-sdks": {
3+
"MSTest.Sdk": "4.0.2"
4+
},
5+
"test": {
6+
"runner": "Microsoft.Testing.Platform"
7+
}
8+
}

src/Cuture.EntityFramework.DynamicFilter/Cuture.EntityFramework.DynamicFilter.csproj

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,22 @@
1818
<Using Include="Microsoft.EntityFrameworkCore.Extensions.Internal;Microsoft.EntityFrameworkCore.Extensions.Utils" />
1919
</ItemGroup>
2020

21-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
22-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
23-
</ItemGroup>
24-
2521
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2622
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
23+
24+
<Using Alias="ParameterValues" Include="Microsoft.EntityFrameworkCore.Query.Internal.IParameterValues" />
25+
</ItemGroup>
26+
27+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
28+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
29+
30+
<Using Alias="ParameterValues" Include="Microsoft.EntityFrameworkCore.Query.Internal.IParameterValues" />
31+
</ItemGroup>
32+
33+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
34+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
35+
36+
<Using Alias="ParameterValues" Include="System.Collections.Generic.Dictionary&lt;System.String, System.Object?&gt;" />
2737
</ItemGroup>
2838

2939
<PropertyGroup Condition="'$(Configuration)' == 'Release'">

0 commit comments

Comments
 (0)