diff --git a/DysonNetwork.Control/DysonNetwork.Control.csproj b/DysonNetwork.Control/DysonNetwork.Control.csproj index 88b0da1..35315d8 100644 --- a/DysonNetwork.Control/DysonNetwork.Control.csproj +++ b/DysonNetwork.Control/DysonNetwork.Control.csproj @@ -3,7 +3,7 @@ Exe - net9.0 + net10.0 enable enable a68b3195-a00d-40c2-b5ed-d675356b7cde @@ -25,4 +25,4 @@ - \ No newline at end of file + diff --git a/DysonNetwork.Develop/DysonNetwork.Develop.csproj b/DysonNetwork.Develop/DysonNetwork.Develop.csproj index 1e7db8d..9cf94e2 100644 --- a/DysonNetwork.Develop/DysonNetwork.Develop.csproj +++ b/DysonNetwork.Develop/DysonNetwork.Develop.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable Linux diff --git a/DysonNetwork.Drive/DysonNetwork.Drive.csproj b/DysonNetwork.Drive/DysonNetwork.Drive.csproj index ae52853..60247ee 100644 --- a/DysonNetwork.Drive/DysonNetwork.Drive.csproj +++ b/DysonNetwork.Drive/DysonNetwork.Drive.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable Linux diff --git a/DysonNetwork.Gateway/DysonNetwork.Gateway.csproj b/DysonNetwork.Gateway/DysonNetwork.Gateway.csproj index 07f4ebc..0e5b190 100644 --- a/DysonNetwork.Gateway/DysonNetwork.Gateway.csproj +++ b/DysonNetwork.Gateway/DysonNetwork.Gateway.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable diff --git a/DysonNetwork.Insight/DysonNetwork.Insight.csproj b/DysonNetwork.Insight/DysonNetwork.Insight.csproj index b30b1a0..20cca23 100644 --- a/DysonNetwork.Insight/DysonNetwork.Insight.csproj +++ b/DysonNetwork.Insight/DysonNetwork.Insight.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable diff --git a/DysonNetwork.Pass/DysonNetwork.Pass.csproj b/DysonNetwork.Pass/DysonNetwork.Pass.csproj index 6f59e43..c38bee1 100644 --- a/DysonNetwork.Pass/DysonNetwork.Pass.csproj +++ b/DysonNetwork.Pass/DysonNetwork.Pass.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable diff --git a/DysonNetwork.Ring/DysonNetwork.Ring.csproj b/DysonNetwork.Ring/DysonNetwork.Ring.csproj index aad51df..74da89c 100644 --- a/DysonNetwork.Ring/DysonNetwork.Ring.csproj +++ b/DysonNetwork.Ring/DysonNetwork.Ring.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable Linux diff --git a/DysonNetwork.Shared/Cache/CacheService.cs b/DysonNetwork.Shared/Cache/CacheService.cs index 8150115..a35a7a6 100644 --- a/DysonNetwork.Shared/Cache/CacheService.cs +++ b/DysonNetwork.Shared/Cache/CacheService.cs @@ -234,11 +234,9 @@ public class CacheServiceRedis : ICacheService var value = await _database.StringGetAsync(key); - if (value.IsNullOrEmpty) - return default; - - // For NodaTime serialization, use the configured JSON options - return JsonSerializer.Deserialize(value!, _jsonOptions); + return value.IsNullOrEmpty ? default : + // For NodaTime serialization, use the configured JSON options + JsonSerializer.Deserialize(value.ToString(), _jsonOptions); } public async Task<(bool found, T? value)> GetAsyncWithStatus(string key) @@ -249,11 +247,9 @@ public class CacheServiceRedis : ICacheService var value = await _database.StringGetAsync(key); - if (value.IsNullOrEmpty) - return (false, default); - - // For NodaTime serialization, use the configured JSON options - return (true, JsonSerializer.Deserialize(value!, _jsonOptions)); + return value.IsNullOrEmpty ? (false, default) : + // For NodaTime serialization, use the configured JSON options + (true, JsonSerializer.Deserialize(value!.ToString(), _jsonOptions)); } public async Task RemoveAsync(string key) diff --git a/DysonNetwork.Shared/DysonNetwork.Shared.csproj b/DysonNetwork.Shared/DysonNetwork.Shared.csproj index 3824ac5..c50db1c 100644 --- a/DysonNetwork.Shared/DysonNetwork.Shared.csproj +++ b/DysonNetwork.Shared/DysonNetwork.Shared.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable @@ -32,7 +32,6 @@ - diff --git a/DysonNetwork.Sphere/Dockerfile b/DysonNetwork.Sphere/Dockerfile index 032d81f..b4e5a21 100644 --- a/DysonNetwork.Sphere/Dockerfile +++ b/DysonNetwork.Sphere/Dockerfile @@ -22,8 +22,8 @@ RUN dotnet restore "DysonNetwork.Sphere/DysonNetwork.Sphere.csproj" COPY . . # Create necessary directories for localized resources -RUN mkdir -p /src/DysonNetwork.Sphere/bin/Release/net9.0/zh-hans \ - && mkdir -p /src/DysonNetwork.Pass/bin/Release/net9.0/zh-hans +RUN mkdir -p /src/DysonNetwork.Sphere/bin/Release/net10.0/zh-hans \ + && mkdir -p /src/DysonNetwork.Pass/bin/Release/net10.0/zh-hans # Build the application WORKDIR "/src/DysonNetwork.Sphere" @@ -42,4 +42,4 @@ RUN dotnet publish "DysonNetwork.Sphere.csproj" -c $BUILD_CONFIGURATION -o /app/ FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "DysonNetwork.Sphere.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "DysonNetwork.Sphere.dll"] diff --git a/DysonNetwork.Sphere/DysonNetwork.Sphere.csproj b/DysonNetwork.Sphere/DysonNetwork.Sphere.csproj index 61cbc4d..02fa8d9 100644 --- a/DysonNetwork.Sphere/DysonNetwork.Sphere.csproj +++ b/DysonNetwork.Sphere/DysonNetwork.Sphere.csproj @@ -1,8 +1,8 @@ - + - net9.0 + net10.0 enable enable Linux diff --git a/DysonNetwork.sln.DotSettings.user b/DysonNetwork.sln.DotSettings.user index 700edb7..e96d2ca 100644 --- a/DysonNetwork.sln.DotSettings.user +++ b/DysonNetwork.sln.DotSettings.user @@ -1,4 +1,4 @@ - + ForceIncluded ForceIncluded ForceIncluded @@ -164,7 +164,7 @@ ForceIncluded ForceIncluded <AssemblyExplorer> - <Assembly Path="/opt/homebrew/Cellar/dotnet/9.0.6/libexec/packs/Microsoft.AspNetCore.App.Ref/9.0.6/ref/net9.0/Microsoft.AspNetCore.RateLimiting.dll" /> + <Assembly Path="/opt/homebrew/Cellar/dotnet/9.0.6/libexec/packs/Microsoft.AspNetCore.App.Ref/9.0.6/ref/net10.0/Microsoft.AspNetCore.RateLimiting.dll" /> <Assembly Path="/Users/littlesheep/.nuget/packages/nodatime/3.2.2/lib/net8.0/NodaTime.dll" /> </AssemblyExplorer> <SessionState ContinuousTestingMode="0" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> @@ -227,4 +227,4 @@ True False - False \ No newline at end of file + False