Skip to content

Commit 43c59e6

Browse files
authored
Merge pull request #95 from GeneralLibrary/script
Adapt to .NET 10 New Features
2 parents 3dc041c + ef74f98 commit 43c59e6

10 files changed

Lines changed: 384 additions & 146 deletions

File tree

src/c#/GeneralUpdate.Bowl/GeneralUpdate.Bowl.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
1919
</PropertyGroup>
2020
<ItemGroup>
21-
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
22-
<PackageReference Include="System.Text.Json" Version="9.0.0" />
21+
<PackageReference Include="System.Collections.Immutable" Version="10.0.1" />
22+
<PackageReference Include="System.Text.Json" Version="10.0.1" />
2323
</ItemGroup>
2424
<ItemGroup>
2525
<Compile Include="..\GeneralUpdate.Common\Compress\CompressProvider.cs" Link="Common\CompressProvider.cs" />
@@ -65,6 +65,7 @@
6565
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\Format.cs" Link="Common\Format.cs" />
6666
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\PlatformType.cs" Link="Common\PlatformType.cs" />
6767
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\ReportType.cs" Link="Common\ReportType.cs" />
68+
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\UpdateMode.cs" Link="Common\UpdateMode.cs" />
6869
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfo.cs" Link="Common\GlobalConfigInfo.cs" />
6970
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfoOSS.cs" Link="Common\GlobalConfigInfoOSS.cs" />
7071
<Compile Include="..\GeneralUpdate.Common\Shared\Object\ObjectTranslator.cs" Link="Common\ObjectTranslator.cs" />

src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\Format.cs" Link="Common\Format.cs" />
6464
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\PlatformType.cs" Link="Common\PlatformType.cs" />
6565
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\ReportType.cs" Link="Common\ReportType.cs" />
66+
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\UpdateMode.cs" Link="Common\UpdateMode.cs" />
6667
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfo.cs" Link="Common\GlobalConfigInfo.cs" />
6768
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfoOSS.cs" Link="Common\GlobalConfigInfoOSS.cs" />
6869
<Compile Include="..\GeneralUpdate.Common\Shared\Object\ObjectTranslator.cs" Link="Common\ObjectTranslator.cs" />
@@ -83,9 +84,9 @@
8384
<Compile Include="..\GeneralUpdate.Differential\DifferentialCore.cs" Link="Common\DifferentialCore.cs" />
8485
</ItemGroup>
8586
<ItemGroup>
86-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.0" />
87-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
88-
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
87+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.1" />
88+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.1" />
89+
<PackageReference Include="System.Collections.Immutable" Version="10.0.1" />
8990
<PackageReference Include="System.Net.Http" Version="4.3.4" />
9091
<PackageReference Include="System.Net.Requests" Version="4.3.0" />
9192
</ItemGroup>

src/c#/GeneralUpdate.Common/GeneralUpdate.Common.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
1919
</PropertyGroup>
2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
22-
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
23-
<PackageReference Include="System.Text.Json" Version="9.0.0" />
21+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.1" />
22+
<PackageReference Include="System.Collections.Immutable" Version="10.0.1" />
23+
<PackageReference Include="System.Text.Json" Version="10.0.1" />
2424
</ItemGroup>
2525
<ItemGroup>
2626
<None Include="../../../imgs/GeneralUpdate.ico">

src/c#/GeneralUpdate.Common/Internal/Bootstrap/UpdateOption.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Diagnostics.Contracts;
44
using System.Text;
55
using System.Threading;
6+
using GeneralUpdate.Common.Shared.Object.Enum;
67

78
namespace GeneralUpdate.Common.Internal.Bootstrap
89
{
@@ -47,6 +48,11 @@ private class UpdateOptionPool : ConstantPool
4748
/// </summary>
4849
public static readonly UpdateOption<bool?> BackUp = ValueOf<bool?>("BACKUP");
4950

51+
/// <summary>
52+
/// Specifies the update execution mode.
53+
/// </summary>
54+
public static readonly UpdateOption<UpdateMode?> Mode = ValueOf<UpdateMode?>("MODE");
55+
5056
internal UpdateOption(int id, string name)
5157
: base(id, name) { }
5258

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace GeneralUpdate.Common.Shared.Object.Enum;
2+
3+
public enum UpdateMode
4+
{
5+
Default = 0,
6+
Scripts = 1
7+
}

src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\Format.cs" Link="Common\Format.cs" />
6969
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\PlatformType.cs" Link="Common\PlatformType.cs" />
7070
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\ReportType.cs" Link="Common\ReportType.cs" />
71+
<Compile Include="..\GeneralUpdate.Common\Shared\Object\Enum\UpdateMode.cs" Link="Common\UpdateMode.cs" />
7172
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfo.cs" Link="Common\GlobalConfigInfo.cs" />
7273
<Compile Include="..\GeneralUpdate.Common\Shared\Object\GlobalConfigInfoOSS.cs" Link="Common\GlobalConfigInfoOSS.cs" />
7374
<Compile Include="..\GeneralUpdate.Common\Shared\Object\ObjectTranslator.cs" Link="Common\ObjectTranslator.cs" />
@@ -91,9 +92,9 @@
9192
<Folder Include="Common\" />
9293
</ItemGroup>
9394
<ItemGroup>
94-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
95-
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
96-
<PackageReference Include="System.Text.Json" Version="9.0.0" />
95+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.1" />
96+
<PackageReference Include="System.Collections.Immutable" Version="10.0.1" />
97+
<PackageReference Include="System.Text.Json" Version="10.0.1" />
9798
</ItemGroup>
9899
<ItemGroup>
99100
<None Include="../../../imgs/GeneralUpdate.ico">

0 commit comments

Comments
 (0)