Skip to content

Commit 74a8edf

Browse files
authored
Merge pull request #85 from PandaTechAM/development
dotnet 10 upgrade
2 parents 7286d99 + 29fdac0 commit 74a8edf

24 files changed

+632
-400
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020

2121
- name: Setup .NET Core
22-
uses: actions/setup-dotnet@v4
22+
uses: actions/setup-dotnet@v5
2323
with:
2424
global-json-file: global.json
2525

.gitignore

Lines changed: 123 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from `dotnet new gitignore`
55

6-
.idea
6+
# dotenv files
7+
.env
78

89
# User-specific files
910
*.rsuser
@@ -31,7 +32,6 @@ x86/
3132
bld/
3233
[Bb]in/
3334
[Oo]bj/
34-
[Oo]ut/
3535
[Ll]og/
3636
[Ll]ogs/
3737

@@ -60,11 +60,14 @@ dlldata.c
6060
# Benchmark Results
6161
BenchmarkDotNet.Artifacts/
6262

63-
# .NET Core
63+
# .NET
6464
project.lock.json
6565
project.fragment.lock.json
6666
artifacts/
6767

68+
# Tye
69+
.tye/
70+
6871
# ASP.NET Scaffolding
6972
ScaffoldingReadMe.txt
7073

@@ -93,6 +96,7 @@ StyleCopReport.xml
9396
*.tmp_proj
9497
*_wpftmp.csproj
9598
*.log
99+
*.tlog
96100
*.vspscc
97101
*.vssscc
98102
.builds
@@ -296,6 +300,17 @@ node_modules/
296300
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
297301
*.vbw
298302

303+
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
304+
*.vbp
305+
306+
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
307+
*.dsw
308+
*.dsp
309+
310+
# Visual Studio 6 technical files
311+
*.ncb
312+
*.aps
313+
299314
# Visual Studio LightSwitch build output
300315
**/*.HTMLClient/GeneratedArtifacts
301316
**/*.DesktopClient/GeneratedArtifacts
@@ -352,6 +367,9 @@ ASALocalRun/
352367
# Local History for Visual Studio
353368
.localhistory/
354369

370+
# Visual Studio History (VSHistory) files
371+
.vshistory/
372+
355373
# BeatPulse healthcheck temp database
356374
healthchecksdb
357375

@@ -364,6 +382,107 @@ MigrationBackup/
364382
# Fody - auto-generated XML schema
365383
FodyWeavers.xsd
366384

385+
# VS Code files for those working on multiple tools
386+
.vscode/*
387+
!.vscode/settings.json
388+
!.vscode/tasks.json
389+
!.vscode/launch.json
390+
!.vscode/extensions.json
391+
*.code-workspace
392+
393+
# Local History for Visual Studio Code
394+
.history/
395+
396+
# Windows Installer files from build outputs
397+
*.cab
398+
*.msi
399+
*.msix
400+
*.msm
401+
*.msp
402+
403+
# JetBrains Rider
404+
*.sln.iml
405+
.idea/
406+
407+
##
408+
## Visual studio for Mac
409+
##
410+
411+
412+
# globs
413+
Makefile.in
414+
*.userprefs
415+
*.usertasks
416+
config.make
417+
config.status
418+
aclocal.m4
419+
install-sh
420+
autom4te.cache/
421+
*.tar.gz
422+
tarballs/
423+
test-results/
424+
425+
# Mac bundle stuff
426+
*.dmg
427+
*.app
428+
429+
# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
430+
# General
431+
.DS_Store
432+
.AppleDouble
433+
.LSOverride
434+
435+
# Icon must end with two \r
436+
Icon
437+
438+
439+
# Thumbnails
440+
._*
441+
442+
# Files that might appear in the root of a volume
443+
.DocumentRevisions-V100
444+
.fseventsd
445+
.Spotlight-V100
446+
.TemporaryItems
447+
.Trashes
448+
.VolumeIcon.icns
449+
.com.apple.timemachine.donotpresent
450+
451+
# Directories potentially created on remote AFP share
452+
.AppleDB
453+
.AppleDesktop
454+
Network Trash Folder
455+
Temporary Items
456+
.apdisk
457+
458+
# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
459+
# Windows thumbnail cache files
460+
Thumbs.db
461+
ehthumbs.db
462+
ehthumbs_vista.db
463+
464+
# Dump file
465+
*.stackdump
466+
467+
# Folder config file
468+
[Dd]esktop.ini
469+
470+
# Recycle Bin used on file shares
471+
$RECYCLE.BIN/
472+
473+
# Windows Installer files
474+
*.cab
475+
*.msi
476+
*.msix
477+
*.msm
478+
*.msp
479+
480+
# Windows shortcuts
481+
*.lnk
482+
483+
# Vim temporary swap files
484+
*.swp
485+
367486
# Added by me
368487
logs
369488
LocalFileStorage

SharedKernel.Demo/MessageHub.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Microsoft.AspNetCore.SignalR;
22
using ResponseCrafter.ExceptionHandlers.SignalR;
3+
using System.Threading;
34

45
namespace SharedKernel.Demo;
56

SharedKernel.Demo/SharedKernel.Demo.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="9.0.0"/>
11-
<PackageReference Include="MassTransit.RabbitMQ" Version="8.5.5" />
12-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.8"/>
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.8"/>
11+
<PackageReference Include="MassTransit.RabbitMQ" Version="8.5.7" />
12+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.1" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.1" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

SharedKernel.sln

Lines changed: 0 additions & 46 deletions
This file was deleted.

SharedKernel.slnx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Solution>
2+
<Folder Name="/Solution Items/">
3+
<File Path=".editorconfig" />
4+
<File Path=".github/workflows/main.yml" />
5+
<File Path=".gitignore" />
6+
<File Path="global.json" />
7+
<File Path="Readme.md" />
8+
</Folder>
9+
<Folder Name="/src/">
10+
<Project Path="src/SharedKernel/SharedKernel.csproj" />
11+
</Folder>
12+
<Folder Name="/test/">
13+
<Project Path="SharedKernel.Demo/SharedKernel.Demo.csproj" />
14+
<Project Path="test/SharedKernel.Tests/SharedKernel.Tests.csproj" />
15+
</Folder>
16+
</Solution>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.200",
3+
"version": "10.0.101",
44
"rollForward": "latestMinor"
55
}
66
}

src/SharedKernel/Extensions/ConfigurationExtensions.cs

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,47 +9,30 @@ internal static class ConfigurationExtensions
99
private const string RepositoryNameConfigurationPath = "RepositoryName";
1010
private const string TimeZoneConfigurationPath = "DefaultTimeZone";
1111

12-
internal static string GetAllowedCorsOrigins(this IConfiguration configuration)
12+
extension(IConfiguration configuration)
1313
{
14-
var corsOrigins = configuration[CorsOriginsConfigurationPath];
15-
if (corsOrigins is null)
14+
internal string GetAllowedCorsOrigins()
1615
{
17-
throw new InvalidOperationException("Allowed CORS origins are not configured.");
16+
var corsOrigins = configuration[CorsOriginsConfigurationPath];
17+
return corsOrigins ?? throw new InvalidOperationException("Allowed CORS origins are not configured.");
1818
}
1919

20-
return corsOrigins;
21-
}
22-
23-
internal static string GetRepositoryName(this IConfiguration configuration)
24-
{
25-
var repositoryName = configuration[RepositoryNameConfigurationPath];
26-
if (repositoryName is null)
20+
internal string GetRepositoryName()
2721
{
28-
throw new InvalidOperationException("Repository name is not configured.");
22+
var repositoryName = configuration[RepositoryNameConfigurationPath];
23+
return repositoryName ?? throw new InvalidOperationException("Repository name is not configured.");
2924
}
3025

31-
return repositoryName;
32-
}
33-
34-
internal static string GetPersistentPath(this IConfiguration configuration)
35-
{
36-
var persistentPath = configuration.GetConnectionString(PersistentConfigurationPath);
37-
if (persistentPath is null)
26+
internal string GetPersistentPath()
3827
{
39-
throw new InvalidOperationException("Persistent path is not configured.");
28+
var persistentPath = configuration.GetConnectionString(PersistentConfigurationPath);
29+
return persistentPath ?? throw new InvalidOperationException("Persistent path is not configured.");
4030
}
4131

42-
return persistentPath;
43-
}
44-
45-
public static string GetDefaultTimeZone(this IConfiguration configuration)
46-
{
47-
var timeZone = configuration[TimeZoneConfigurationPath];
48-
if (timeZone is null)
32+
public string GetDefaultTimeZone()
4933
{
50-
throw new InvalidOperationException("Default time zone is not configured.");
34+
var timeZone = configuration[TimeZoneConfigurationPath];
35+
return timeZone ?? throw new InvalidOperationException("Default time zone is not configured.");
5136
}
52-
53-
return timeZone;
5437
}
5538
}

src/SharedKernel/Extensions/HealthCheckExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public static WebApplication MapHealthCheckEndpoints(this WebApplication app)
4141
app
4242
.MapGet($"{EndpointConstants.BasePath}/ping", () => "pong")
4343
.Produces<string>()
44-
.WithTags(EndpointConstants.TagName)
45-
.WithOpenApi();
44+
.WithTags(EndpointConstants.TagName);
4645

4746
app.MapHealthChecks($"{EndpointConstants.BasePath}/health",
4847
new HealthCheckOptions

0 commit comments

Comments
 (0)