Skip to content

Commit 8343a6f

Browse files
committed
opt: add tfm net10.0
1 parent 57825c7 commit 8343a6f

19 files changed

+68
-62
lines changed

.editorconfig

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +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
10+
indent_size = 2
11+
tab_width = 2
1512

1613
# c# 文件
1714
[*.cs]
@@ -116,6 +113,7 @@ csharp_style_prefer_readonly_struct = true
116113
# 代码块首选项
117114
csharp_prefer_braces = true:silent
118115
csharp_prefer_simple_using_statement = true:suggestion
116+
csharp_prefer_system_threading_lock = true:suggestion
119117
csharp_style_namespace_declarations = file_scoped:suggestion
120118
csharp_style_prefer_method_group_conversion = true:silent
121119
csharp_style_prefer_top_level_statements = true:silent
@@ -131,6 +129,7 @@ csharp_style_prefer_null_check_over_type_check = true
131129
csharp_style_prefer_range_operator = true
132130
csharp_style_prefer_tuple_swap = true
133131
csharp_style_prefer_utf8_string_literals = true
132+
csharp_style_prefer_primary_constructors = true:suggestion
134133
csharp_style_throw_expression = true
135134
csharp_style_unused_value_assignment_preference = discard_variable
136135
csharp_style_unused_value_expression_statement_preference = discard_variable
@@ -297,7 +296,3 @@ dotnet_naming_style.以_为前缀.required_prefix = _
297296
dotnet_naming_style.以_为前缀.required_suffix =
298297
dotnet_naming_style.以_为前缀.word_separator =
299298
dotnet_naming_style.以_为前缀.capitalization = camel_case
300-
301-
[*.csproj]
302-
indent_size = 2
303-
tab_width = 2

.github/workflows/PublishNugetPackage.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ jobs:
1616
uses: actions/setup-dotnet@v4
1717
with:
1818
dotnet-version: |
19-
8.0.x
19+
8.x
2020
9.x
21+
10.x
2122
- name: restore dependencies
2223
run: dotnet restore
2324
- name: build

Cuture.Http.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<File Path="Directory.Build.props" />
88
<File Path="global.json" />
99
<File Path="LICENSE" />
10-
<File Path="readme.md" />
10+
<File Path="README.md" />
1111
</Folder>
1212
<Folder Name="/src/">
1313
<Project Path="src/Cuture.Http/Cuture.Http.csproj" />

Directory.Build.props

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

55
<LangVersion>latest</LangVersion>
66
<ImplicitUsings>true</ImplicitUsings>
@@ -12,12 +12,16 @@
1212
<McrDotNetVersion>9.0.0</McrDotNetVersion>
1313
</PropertyGroup>
1414

15+
<PropertyGroup Condition="$(TargetFramework) == 'net10.0'">
16+
<McrDotNetVersion>10.0.0</McrDotNetVersion>
17+
</PropertyGroup>
18+
1519
<!--Package Info-->
1620
<PropertyGroup>
1721
<PackageIdPrefix>Cuture.Http</PackageIdPrefix>
1822
<Authors>Stratos</Authors>
1923

20-
<Version>2.10.0</Version>
24+
<Version>2.11.0</Version>
2125

2226
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2327
<PackageProjectUrl>https://github.com/cuture/Cuture.Http</PackageProjectUrl>
File renamed without changes.

global.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"msbuild-sdks": {
3-
"MSTest.Sdk": "3.8.3"
3+
"MSTest.Sdk": "4.0.2"
4+
},
5+
"test": {
6+
"runner": "Microsoft.Testing.Platform"
47
}
58
}

src/Cuture.Http/Cuture.Http.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Description>用于快速进行Http请求的链式拓展方法库</Description>
44

5-
<PackageReadmeFile>readme.md</PackageReadmeFile>
5+
<PackageReadmeFile>README.md</PackageReadmeFile>
66

77
<Nullable>enable</Nullable>
88

@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<None Include="..\..\readme.md" Link="readme.md" Pack="true" PackagePath="/" />
19+
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="/" />
2020

2121
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
2222
<_Parameter1>Cuture.Http.Test</_Parameter1>

src/Cuture.Http/DynamicJSON/Undefined.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ public static bool IsUndefined(in Func<object?> proprytyAccessDelegate)
8484
/// <summary>
8585
///
8686
/// </summary>
87-
/// <param name="a"></param>
87+
/// <param name="_"></param>
8888
/// <param name="b"></param>
8989
/// <returns></returns>
90-
public static bool operator !=(Undefined a, object b)
90+
public static bool operator !=(Undefined _, object b)
9191
{
9292
return b is not null && b is not Undefined;
9393
}
9494

9595
/// <summary>
9696
///
9797
/// </summary>
98-
/// <param name="a"></param>
98+
/// <param name="_"></param>
9999
/// <param name="b"></param>
100100
/// <returns></returns>
101-
public static bool operator ==(Undefined a, object b)
101+
public static bool operator ==(Undefined _, object b)
102102
{
103103
return b is null || b is Undefined;
104104
}

src/Cuture.Http/Util/RequestBuildTool.Curl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static partial class RequestBuildTool
2121

2222
private static readonly FrozenDictionary<ReadOnlyMemory<char>, OrderedOptionDescriptor> s_curlOptionDescriptors = new Dictionary<ReadOnlyMemory<char>, OrderedOptionDescriptor>()
2323
{
24-
{ "-X".AsMemory(), new (0, static (IHttpRequest request, in CurlCommandToken token) => request.UseVerb(token.Value.Span)) },
24+
{ "-X".AsMemory(), new (0, static (request, in token) => request.UseVerb(token.Value.Span)) },
2525
{ "-H".AsMemory(), new(0, SetupRequestHeader) },
2626
{ "--data-raw".AsMemory(), new(100, SetupRequestContentData) },
2727
{ "--compressed".AsMemory(), new(0, NoopRequestSetupDelegate, true) }, //已强制请求需要压缩

tests/Cuture.Http.Test.Server/Cuture.Http.Test.Server.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
<ItemGroup>
2222
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(McrDotNetVersion)" />
23-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(McrDotNetVersion)" />
24-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="$(McrDotNetVersion)" />
25-
<PackageReference Include="System.IO.Pipelines" Version="$(McrDotNetVersion)" />
2623

2724
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(McrDotNetVersion)" />
2825
</ItemGroup>

0 commit comments

Comments
 (0)