Skip to content

Commit

Permalink
change source generator
Browse files Browse the repository at this point in the history
  • Loading branch information
witskeeper committed Sep 15, 2023
1 parent e609134 commit 0ed27b1
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 19 deletions.
6 changes: 3 additions & 3 deletions netcorepal-cloud-framework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DistributedTransactions.Abstractions\NetCorePal.Extensions.DistributedTransactions.Abstractions.csproj" />
<ProjectReference Include="..\DistributedTransactions.CAP.CodeGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj" />
<ProjectReference Include="..\Repository.EntityframeworkCore\NetCorePal.Extensions.Repository.EntityframeworkCore.csproj" />
</ItemGroup>

<ItemGroup Label="Package">
<None Include="..\DistributedTransactions.CAP.SourceGenerators\bin\$(Configuration)\netstandard2.0\NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.dll"
PackagePath="analyzers\dotnet\cs"
Pack="true"
Visible="false" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<ItemGroup>
<PackageReference Include="MediatR" Version="12.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Domain.CodeGenerators\NetCorePal.Extensions.Domain.CodeGenerators.csproj" />
<ItemGroup Label="Package">
<None Include="..\Domain.SourceGenerators\bin\$(Configuration)\netstandard2.0\NetCorePal.Extensions.Domain.SourceGenerators.dll"
PackagePath="analyzers\dotnet\cs"
Pack="true"
Visible="false" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<ItemGroup>
<ProjectReference Include="..\Primitives\NetCorePal.Extensions.Primitives.csproj" />
<ProjectReference Include="..\Repository.Abstractions\NetCorePal.Extensions.Repository.Abstractions.csproj" />
<ProjectReference Include="..\Repository.EntityframeworkCore.CodeGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj" />
</ItemGroup>

<ItemGroup Label="Package">
<None Include="..\Repository.EntityframeworkCore.SourceGenerators\bin\$(Configuration)\netstandard2.0\NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.dll"
PackagePath="analyzers\dotnet\cs"
Pack="true"
Visible="false" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions test/ConsoleApp/NetCorePal.ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\DistributedTransactions.CAP.CodeGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\DistributedTransactions.CAP.SourceGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\DistributedTransactions.CAP\NetCorePal.Extensions.DistributedTransactions.CAP.csproj" />
<ProjectReference Include="..\..\src\Repository.Abstractions\NetCorePal.Extensions.Repository.Abstractions.csproj" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore.CodeGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Domain.CodeGenerators\NetCorePal.Extensions.Domain.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore.SourceGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Domain.SourceGenerators\NetCorePal.Extensions.Domain.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore\NetCorePal.Extensions.Repository.EntityframeworkCore.csproj" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions test/NetCorePal.Web/NetCorePal.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\DistributedTransactions.CAP.CodeGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\DistributedTransactions.CAP.SourceGenerators\NetCorePal.Extensions.DistributedTransactions.CAP.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\DistributedTransactions.CAP.PostgreSql\NetCorePal.Extensions.DistributedTransactions.CAP.PostgreSql.csproj" />
<ProjectReference Include="..\..\src\DistributedTransactions.CAP\NetCorePal.Extensions.DistributedTransactions.CAP.csproj" />
<ProjectReference Include="..\..\src\Domain.Abstractions\NetCorePal.Extensions.Domain.Abstractions.csproj" />
<ProjectReference Include="..\..\src\Domain.CodeGenerators\NetCorePal.Extensions.Domain.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Domain.SourceGenerators\NetCorePal.Extensions.Domain.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Mappers\NetCorePal.Extensions.Mappers.csproj" />
<ProjectReference Include="..\..\src\Primitives\NetCorePal.Extensions.Primitives.csproj" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore.CodeGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.CodeGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore.SourceGenerators\NetCorePal.Extensions.Repository.EntityframeworkCore.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Repository.EntityframeworkCore\NetCorePal.Extensions.Repository.EntityframeworkCore.csproj" />
<ProjectReference Include="..\..\src\Snowflake.EntityFrameworkCore\NetCorePal.Extensions.Snowflake.EntityFrameworkCore.csproj" />
</ItemGroup>
Expand Down

0 comments on commit 0ed27b1

Please sign in to comment.