From 0ed27b15c169a56176c64900677e48ce52cf0489 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 15 Sep 2023 19:22:53 +0800 Subject: [PATCH] change source generator --- netcorepal-cloud-framework.sln | 6 +++--- .../CAPSagaSubscriberSourceGenerator.cs | 2 +- .../CAPSubscriberSourceGenerator.cs | 2 +- ...s.DistributedTransactions.CAP.SourceGenerators.csproj} | 1 + .../Properties/launchSettings.json | 0 ...tCorePal.Extensions.DistributedTransactions.CAP.csproj | 8 ++++++-- .../NetCorePal.Extensions.Domain.Abstractions.csproj | 8 +++++--- .../EntityIdCodeGenerators.cs | 0 .../MermaidDomainCodeGenerators.cs | 0 .../NetCorePal.Extensions.Domain.SourceGenerators.csproj} | 1 + .../Properties/launchSettings.json | 0 .../EFContextSourceGenerator.cs | 2 +- ...epository.EntityframeworkCore.SourceGenerators.csproj} | 1 + .../Properties/launchSettings.json | 0 ...rePal.Extensions.Repository.EntityframeworkCore.csproj | 8 ++++++-- test/ConsoleApp/NetCorePal.ConsoleApp.csproj | 6 +++--- test/NetCorePal.Web/NetCorePal.Web.csproj | 6 +++--- 17 files changed, 32 insertions(+), 19 deletions(-) rename src/{DistributedTransactions.CAP.CodeGenerators => DistributedTransactions.CAP.SourceGenerators}/CAPSagaSubscriberSourceGenerator.cs (98%) rename src/{DistributedTransactions.CAP.CodeGenerators => DistributedTransactions.CAP.SourceGenerators}/CAPSubscriberSourceGenerator.cs (98%) rename src/{DistributedTransactions.CAP.CodeGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj => DistributedTransactions.CAP.SourceGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj} (97%) rename src/{DistributedTransactions.CAP.CodeGenerators => DistributedTransactions.CAP.SourceGenerators}/Properties/launchSettings.json (100%) rename src/{Domain.CodeGenerators => Domain.SourceGenerators}/EntityIdCodeGenerators.cs (100%) rename src/{Domain.CodeGenerators => Domain.SourceGenerators}/MermaidDomainCodeGenerators.cs (100%) rename src/{Domain.CodeGenerators/NetCorePal.Extensions.Domain.CodeGenerators.csproj => Domain.SourceGenerators/NetCorePal.Extensions.Domain.SourceGenerators.csproj} (97%) rename src/{Domain.CodeGenerators => Domain.SourceGenerators}/Properties/launchSettings.json (100%) rename src/{Repository.EntityframeworkCore.CodeGenerators => Repository.EntityframeworkCore.SourceGenerators}/EFContextSourceGenerator.cs (99%) rename src/{Repository.EntityframeworkCore.CodeGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj => Repository.EntityframeworkCore.SourceGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj} (97%) rename src/{Repository.EntityframeworkCore.CodeGenerators => Repository.EntityframeworkCore.SourceGenerators}/Properties/launchSettings.json (100%) diff --git a/netcorepal-cloud-framework.sln b/netcorepal-cloud-framework.sln index d4efe748..d56138d3 100644 --- a/netcorepal-cloud-framework.sln +++ b/netcorepal-cloud-framework.sln @@ -57,11 +57,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Mappe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Mappers.UnitTests", "test\NetCorePal.Extensions.Mappers.UnitTests\NetCorePal.Extensions.Mappers.UnitTests.csproj", "{A36FC72F-518C-47F2-B792-2A6D6BEA1C17}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators", "src\Repository.EntityframeworkCore.CodeGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj", "{2E492705-68E8-4FC1-B43E-D7A964873147}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators", "src\Repository.EntityframeworkCore.SourceGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj", "{2E492705-68E8-4FC1-B43E-D7A964873147}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.ConsoleApp", "test\ConsoleApp\NetCorePal.ConsoleApp.csproj", "{C8928510-01E9-4C1C-9F49-39F8C0005051}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Domain.CodeGenerators", "src\Domain.CodeGenerators\NetCorePal.Extensions.Domain.CodeGenerators.csproj", "{42F1DD5F-0EF6-4E71-943E-33D203C713DE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Domain.SourceGenerators", "src\Domain.SourceGenerators\NetCorePal.Extensions.Domain.SourceGenerators.csproj", "{42F1DD5F-0EF6-4E71-943E-33D203C713DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{C59B7768-0F74-4E27-8386-68BB31AF71D1}" ProjectSection(SolutionItems) = preProject @@ -83,7 +83,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.Distr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.DistributedTransactions.CAP.PostgreSql", "src\DistributedTransactions.CAP.PostgreSql\NetCorePal.Extensions.DistributedTransactions.CAP.PostgreSql.csproj", "{2FDB8D38-64C0-47F5-857A-79F589E266C9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators", "src\DistributedTransactions.CAP.CodeGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj", "{6409206D-2C31-4216-8FE6-A578A4571215}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators", "src\DistributedTransactions.CAP.SourceGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj", "{6409206D-2C31-4216-8FE6-A578A4571215}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCorePal.Extensions.DistributedTransactions.Sagas.UnitTests", "test\NetCorePal.Extensions.DistributedTransactions.Sagas.UnitTests\NetCorePal.Extensions.DistributedTransactions.Sagas.UnitTests.csproj", "{76CFA030-3580-4018-A17B-9A192346CB73}" EndProject diff --git a/src/DistributedTransactions.CAP.CodeGenerators/CAPSagaSubscriberSourceGenerator.cs b/src/DistributedTransactions.CAP.SourceGenerators/CAPSagaSubscriberSourceGenerator.cs similarity index 98% rename from src/DistributedTransactions.CAP.CodeGenerators/CAPSagaSubscriberSourceGenerator.cs rename to src/DistributedTransactions.CAP.SourceGenerators/CAPSagaSubscriberSourceGenerator.cs index 17a516eb..cc811141 100644 --- a/src/DistributedTransactions.CAP.CodeGenerators/CAPSagaSubscriberSourceGenerator.cs +++ b/src/DistributedTransactions.CAP.SourceGenerators/CAPSagaSubscriberSourceGenerator.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; -namespace NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators +namespace NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators { [Generator] public class CAPSagaSubscriberSourceGenerator : ISourceGenerator diff --git a/src/DistributedTransactions.CAP.CodeGenerators/CAPSubscriberSourceGenerator.cs b/src/DistributedTransactions.CAP.SourceGenerators/CAPSubscriberSourceGenerator.cs similarity index 98% rename from src/DistributedTransactions.CAP.CodeGenerators/CAPSubscriberSourceGenerator.cs rename to src/DistributedTransactions.CAP.SourceGenerators/CAPSubscriberSourceGenerator.cs index e3b92029..2dbcd779 100644 --- a/src/DistributedTransactions.CAP.CodeGenerators/CAPSubscriberSourceGenerator.cs +++ b/src/DistributedTransactions.CAP.SourceGenerators/CAPSubscriberSourceGenerator.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; -namespace NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators +namespace NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators { [Generator] public class CAPSubscriberSourceGenerator : ISourceGenerator diff --git a/src/DistributedTransactions.CAP.CodeGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj b/src/DistributedTransactions.CAP.SourceGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj similarity index 97% rename from src/DistributedTransactions.CAP.CodeGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj rename to src/DistributedTransactions.CAP.SourceGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj index f01f26fa..729f11f9 100644 --- a/src/DistributedTransactions.CAP.CodeGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj +++ b/src/DistributedTransactions.CAP.SourceGenerators/NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj @@ -8,6 +8,7 @@ true latest true + false diff --git a/src/DistributedTransactions.CAP.CodeGenerators/Properties/launchSettings.json b/src/DistributedTransactions.CAP.SourceGenerators/Properties/launchSettings.json similarity index 100% rename from src/DistributedTransactions.CAP.CodeGenerators/Properties/launchSettings.json rename to src/DistributedTransactions.CAP.SourceGenerators/Properties/launchSettings.json diff --git a/src/DistributedTransactions.CAP/NetCorePal.Extensions.DistributedTransactions.CAP.csproj b/src/DistributedTransactions.CAP/NetCorePal.Extensions.DistributedTransactions.CAP.csproj index b7a559f7..374dc331 100644 --- a/src/DistributedTransactions.CAP/NetCorePal.Extensions.DistributedTransactions.CAP.csproj +++ b/src/DistributedTransactions.CAP/NetCorePal.Extensions.DistributedTransactions.CAP.csproj @@ -10,8 +10,12 @@ - - + + + diff --git a/src/Domain.Abstractions/NetCorePal.Extensions.Domain.Abstractions.csproj b/src/Domain.Abstractions/NetCorePal.Extensions.Domain.Abstractions.csproj index e4b4f4c9..ccd8103b 100644 --- a/src/Domain.Abstractions/NetCorePal.Extensions.Domain.Abstractions.csproj +++ b/src/Domain.Abstractions/NetCorePal.Extensions.Domain.Abstractions.csproj @@ -10,9 +10,11 @@ - - - + + diff --git a/src/Domain.CodeGenerators/EntityIdCodeGenerators.cs b/src/Domain.SourceGenerators/EntityIdCodeGenerators.cs similarity index 100% rename from src/Domain.CodeGenerators/EntityIdCodeGenerators.cs rename to src/Domain.SourceGenerators/EntityIdCodeGenerators.cs diff --git a/src/Domain.CodeGenerators/MermaidDomainCodeGenerators.cs b/src/Domain.SourceGenerators/MermaidDomainCodeGenerators.cs similarity index 100% rename from src/Domain.CodeGenerators/MermaidDomainCodeGenerators.cs rename to src/Domain.SourceGenerators/MermaidDomainCodeGenerators.cs diff --git a/src/Domain.CodeGenerators/NetCorePal.Extensions.Domain.CodeGenerators.csproj b/src/Domain.SourceGenerators/NetCorePal.Extensions.Domain.SourceGenerators.csproj similarity index 97% rename from src/Domain.CodeGenerators/NetCorePal.Extensions.Domain.CodeGenerators.csproj rename to src/Domain.SourceGenerators/NetCorePal.Extensions.Domain.SourceGenerators.csproj index 833bb18e..22083d7e 100644 --- a/src/Domain.CodeGenerators/NetCorePal.Extensions.Domain.CodeGenerators.csproj +++ b/src/Domain.SourceGenerators/NetCorePal.Extensions.Domain.SourceGenerators.csproj @@ -8,6 +8,7 @@ true latest true + false diff --git a/src/Domain.CodeGenerators/Properties/launchSettings.json b/src/Domain.SourceGenerators/Properties/launchSettings.json similarity index 100% rename from src/Domain.CodeGenerators/Properties/launchSettings.json rename to src/Domain.SourceGenerators/Properties/launchSettings.json diff --git a/src/Repository.EntityframeworkCore.CodeGenerators/EFContextSourceGenerator.cs b/src/Repository.EntityframeworkCore.SourceGenerators/EFContextSourceGenerator.cs similarity index 99% rename from src/Repository.EntityframeworkCore.CodeGenerators/EFContextSourceGenerator.cs rename to src/Repository.EntityframeworkCore.SourceGenerators/EFContextSourceGenerator.cs index 81d999a6..ff42b278 100644 --- a/src/Repository.EntityframeworkCore.CodeGenerators/EFContextSourceGenerator.cs +++ b/src/Repository.EntityframeworkCore.SourceGenerators/EFContextSourceGenerator.cs @@ -8,7 +8,7 @@ using System.Reflection.Emit; using System.Text; -namespace NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators +namespace NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators { [Generator] public class EFContextSourceGenerator : ISourceGenerator diff --git a/src/Repository.EntityframeworkCore.CodeGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj b/src/Repository.EntityframeworkCore.SourceGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj similarity index 97% rename from src/Repository.EntityframeworkCore.CodeGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj rename to src/Repository.EntityframeworkCore.SourceGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj index e0c23728..23e9d754 100644 --- a/src/Repository.EntityframeworkCore.CodeGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj +++ b/src/Repository.EntityframeworkCore.SourceGenerators/NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj @@ -8,6 +8,7 @@ true latest true + false diff --git a/src/Repository.EntityframeworkCore.CodeGenerators/Properties/launchSettings.json b/src/Repository.EntityframeworkCore.SourceGenerators/Properties/launchSettings.json similarity index 100% rename from src/Repository.EntityframeworkCore.CodeGenerators/Properties/launchSettings.json rename to src/Repository.EntityframeworkCore.SourceGenerators/Properties/launchSettings.json diff --git a/src/Repository.EntityframeworkCore/NetCorePal.Extensions.Repository.EntityframeworkCore.csproj b/src/Repository.EntityframeworkCore/NetCorePal.Extensions.Repository.EntityframeworkCore.csproj index 7195437b..bd6f7ddf 100644 --- a/src/Repository.EntityframeworkCore/NetCorePal.Extensions.Repository.EntityframeworkCore.csproj +++ b/src/Repository.EntityframeworkCore/NetCorePal.Extensions.Repository.EntityframeworkCore.csproj @@ -12,7 +12,11 @@ - - + + + diff --git a/test/ConsoleApp/NetCorePal.ConsoleApp.csproj b/test/ConsoleApp/NetCorePal.ConsoleApp.csproj index fb75e6b9..e6cd5801 100644 --- a/test/ConsoleApp/NetCorePal.ConsoleApp.csproj +++ b/test/ConsoleApp/NetCorePal.ConsoleApp.csproj @@ -17,11 +17,11 @@ - + - - + + diff --git a/test/NetCorePal.Web/NetCorePal.Web.csproj b/test/NetCorePal.Web/NetCorePal.Web.csproj index a0b6c859..76bd3301 100644 --- a/test/NetCorePal.Web/NetCorePal.Web.csproj +++ b/test/NetCorePal.Web/NetCorePal.Web.csproj @@ -18,14 +18,14 @@ - + - + - +