Skip to content

Commit a804a9b

Browse files
committed
feat: Add StrongIdGenerator source generator for creating strong IDs
- Implemented StrongIdGenerator to generate strong ID structs with underlying types. - Added support for implicit and explicit conversions, equality checks, and ToString methods. - Introduced New() and TryParse() methods for GUID-based strong IDs. test: Create test application for source generator - Added AStar.Dev.SourceGenerators.TestApp project to test the StrongIdGenerator. - Implemented Order, OrderDto, and PaymentsOptions classes to utilize generated strong IDs. - Configured appsettings.json and options.schema for testing. chore: Update project references in AStar.Dev.Web - Updated project references to include source generators and annotations. - Ensured proper integration of generated services in the web application. test: Add unit tests for service collection extensions - Created tests for service collection extensions to validate generated service registrations. - Included mock services and configuration for comprehensive testing. refactor: Clean up and organize test files - Removed commented-out code and organized test files for better readability. - Ensured all tests are properly structured and ready for execution.
1 parent 39d6db0 commit a804a9b

File tree

71 files changed

+2170
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2170
-33
lines changed

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "C#: AStar Dev Aspire Debug",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/src/aspire/AStar.Dev.Web.AppHost/bin/Debug/net10.0/AStar.Dev.Web.AppHost.dll",
12+
"preLaunchTask": "build",
13+
"cwd": "${workspaceFolder}/src/aspire/AStar.Dev.Web.AppHost",
14+
"stopAtEntry": false
15+
}
16+
]
17+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"type": "process",
7+
"command": "dotnet",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/src/aspire/AStar.Dev.Web.AppHost/AStar.Dev.Web.AppHost.csproj",
11+
"-c",
12+
"Debug",
13+
"-f",
14+
"net10.0"
15+
],
16+
"problemMatcher": "$msCompile",
17+
"group": {
18+
"kind": "build",
19+
"isDefault": true
20+
},
21+
"presentation": {
22+
"reveal": "always",
23+
"panel": "shared"
24+
}
25+
}
26+
]
27+
}

AStar.Dev.Web.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/CodeEditing/SuppressNullableWarningFix/Enabled/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>

AStar.Dev.Web.slnx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,34 @@
1919
</Folder>
2020
<Folder Name="/src/" />
2121
<Folder Name="/src/aspire/">
22-
<Project Path="src/aspire/AStar.Dev.Aspire.Common/AStar.Dev.Aspire.Common.csproj" />
23-
<Project Path="src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj" />
24-
<Project Path="src/aspire/AStar.Web.ServiceDefaults/AStar.Web.ServiceDefaults.csproj" />
22+
<Project Path="src\aspire\AStar.Dev.Web.AppHost\AStar.Dev.Web.AppHost.csproj" />
23+
<Project Path="src\aspire\AStar.Dev.Web.Aspire.Common\AStar.Dev.Web.Aspire.Common.csproj" />
24+
<Project Path="src\aspire\AStar.Dev.Web.ServiceDefaults\AStar.Dev.Web.ServiceDefaults.csproj" />
2525
</Folder>
2626
<Folder Name="/src/modules/" />
2727
<Folder Name="/src/modules/apis/">
28+
<Project Path="src/modules/apis/AStar.Dev.Files.Classifications.Api/AStar.Dev.Files.Classifications.Api.csproj" />
2829
<Project Path="src/modules/apis/AStar.Web.ApiService/AStar.Web.ApiService.csproj" />
2930
</Folder>
31+
<Folder Name="/src/services/">
32+
<Project Path="src/services/AStar.Dev.OneDrive.Client/AStar.Dev.OneDrive.Client.csproj" />
33+
</Folder>
34+
<Folder Name="/src/source-generators/">
35+
<Project Path="src/source-generators/AStar.Dev.Annotations/AStar.Dev.Annotations.csproj" />
36+
<Project Path="src/source-generators/AStar.Dev.Source.Generators/AStar.Dev.Source.Generators.csproj" />
37+
</Folder>
3038
<Folder Name="/src/uis/">
39+
<Project Path="src/uis/aspnet-core-changed-files-delta/AspnetCore-Changed-Files.csproj" />
3140
<Project Path="src\uis\AStar.Dev.Web\AStar.Dev.Web.csproj" />
3241
</Folder>
3342
<Folder Name="/test/" />
3443
<Folder Name="/test/aspire/" />
3544
<Folder Name="/test/modules/" />
3645
<Folder Name="/test/modules/apis/" />
3746
<Folder Name="/test/nuget-packages/" />
47+
<Folder Name="/test/source-generators/">
48+
<Project Path="test/source-generators/AStar.Dev.Source.Generators.Tests.Unit/AStar.Dev.Source.Generators.Test.Unit.csproj" />
49+
</Folder>
3850
<Folder Name="/test/uis/">
3951
<Project Path="test/uis/AStar.Dev.Web.Tests.Unit/AStar.Dev.Web.Tests.Unit.csproj" />
4052
<Project Path="test\uis\AStar.Dev.Web.Tests.Integration\AStar.Dev.Web.Tests.Integration.csproj" />

src/aspire/AStar.Web.AppHost/AStar.Web.AppHost.csproj renamed to src/aspire/AStar.Dev.Web.AppHost/AStar.Dev.Web.AppHost.csproj

File renamed without changes.
File renamed without changes.

src/aspire/AStar.Web.AppHost/Properties/launchSettings.json renamed to src/aspire/AStar.Dev.Web.AppHost/Properties/launchSettings.json

File renamed without changes.
File renamed without changes.

src/aspire/AStar.Dev.Aspire.Common/AStar.Dev.Aspire.Common.csproj renamed to src/aspire/AStar.Dev.Web.Aspire.Common/AStar.Dev.Web.Aspire.Common.csproj

File renamed without changes.

src/aspire/AStar.Dev.Aspire.Common/AspireConstants.cs renamed to src/aspire/AStar.Dev.Web.Aspire.Common/AspireConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace AStar.Dev.Aspire.Common;
1+
namespace AStar.Dev.Web.Aspire.Common;
22

33
public static class AspireConstants
44
{

0 commit comments

Comments
 (0)