Skip to content

Commit

Permalink
Whipstaff (#165)
Browse files Browse the repository at this point in the history
* prep for whipstaff

* generation now firing again

* now using whipstaff namespaces

* Update version.json

* Delete TestEntityTypeConfigurationGenerator.cs
  • Loading branch information
dpvreony authored Aug 24, 2021
1 parent a9ab6cf commit 52361ac
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 88 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<LangVersion>9</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Whipstaff.AspNetCore" Version="5.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Dhgms.Nucleotide.ModelTests\Dhgms.Nucleotide.SampleGenerator.csproj" PrivateAssets="all" ReferenceOutputAssembly="true" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="$(ProjectDir)..\Dhgms.Nucleotide.ModelTests\bin\$(Configuration)\netstandard2.0\Dhgms.Nucleotide.SampleGenerator.dll" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" PrivateAssets="none" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" PrivateAssets="none" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
var className = entityGenerationModel.ClassName;
return new []
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableCommandFactory<Commands.IAdd{className}Command, RequestDtos.Add{className}RequestDto, ResponseDtos.Add{className}ResponseDto, Commands.IDelete{className}Command, ResponseDtos.Delete{className}ResponseDto, Commands.IUpdate{className}Command, RequestDtos.Update{className}RequestDto, ResponseDtos.Update{className}ResponseDto>"
$"Whipstaff.Core.IAuditableCommandFactory<Commands.IAdd{className}Command, RequestDtos.Add{className}RequestDto, ResponseDtos.Add{className}ResponseDto, Commands.IDelete{className}Command, ResponseDtos.Delete{className}ResponseDto, Commands.IUpdate{className}Command, RequestDtos.Update{className}RequestDto, ResponseDtos.Update{className}ResponseDto>"
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
{
return new[]
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}

return new[]
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
var className = entityGenerationModel.ClassName;
return new []
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableQueryFactory<Queries.IList{className}Query, RequestDtos.List{className}RequestDto, ResponseDtos.List{className}ResponseDto, Queries.IView{className}Query, ResponseDtos.View{className}ResponseDto>"
$"Whipstaff.Core.IAuditableQueryFactory<Queries.IList{className}Query, RequestDtos.List{className}RequestDto, ResponseDtos.List{className}ResponseDto, Queries.IView{className}Query, ResponseDtos.View{className}ResponseDto>"
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
{
return new[]
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}

return new[]
{
$"Dhgms.AspNetCoreContrib.Abstractions.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected override IList<string> GetUsings()

/// <inheritdoc />
protected override string GetBaseClass(string entityName) =>
$"Dhgms.AspNetCoreContrib.Controllers.QueryOnlyController<{entityName}Controller, Queries.IList{entityName}Query, RequestDtos.List{entityName}RequestDto, ResponseDtos.List{entityName}ResponseDto, Queries.IView{entityName}Query, ResponseDtos.View{entityName}ResponseDto>";
$"Whipstaff.AspNetCore.QueryOnlyController<{entityName}Controller, Queries.IList{entityName}Query, RequestDtos.List{entityName}RequestDto, ResponseDtos.List{entityName}ResponseDto, Queries.IView{entityName}Query, ResponseDtos.View{entityName}ResponseDto>";

protected override IList<string> GetImplementedInterfaces(string entityName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected override IList<string> GetUsings()

/// <inheritdoc />
protected override string GetBaseClass(string entityName) =>
$"Dhgms.AspNetCoreContrib.Controllers.CrudController<{entityName}Controller, Queries.IList{entityName}Query, RequestDtos.List{entityName}RequestDto, ResponseDtos.List{entityName}ResponseDto, Queries.IView{entityName}Query, ResponseDtos.View{entityName}ResponseDto, Commands.IAdd{entityName}Command, RequestDtos.Add{entityName}RequestDto, ResponseDtos.Add{entityName}ResponseDto, Commands.IDelete{entityName}Command, ResponseDtos.Delete{entityName}ResponseDto, Commands.IUpdate{entityName}Command, RequestDtos.Update{entityName}RequestDto, ResponseDtos.Update{entityName}ResponseDto>";
$"Whipstaff.AspNetCore.CrudController<{entityName}Controller, Queries.IList{entityName}Query, RequestDtos.List{entityName}RequestDto, ResponseDtos.List{entityName}ResponseDto, Queries.IView{entityName}Query, ResponseDtos.View{entityName}ResponseDto, Commands.IAdd{entityName}Command, RequestDtos.Add{entityName}RequestDto, ResponseDtos.Add{entityName}ResponseDto, Commands.IDelete{entityName}Command, ResponseDtos.Delete{entityName}ResponseDto, Commands.IUpdate{entityName}Command, RequestDtos.Update{entityName}RequestDto, ResponseDtos.Update{entityName}ResponseDto>";

protected override IList<string> GetImplementedInterfaces(string entityName)
{
Expand Down
19 changes: 0 additions & 19 deletions src/Dhgms.Nucleotide.ModelTests/Dhgms.Nucleotide.ModelTests.csproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Dhgms.Nucleotide.Generators\Dhgms.Nucleotide.Generators.csproj" PrivateAssets="all" ReferenceOutputAssembly="true" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="$(ProjectDir)..\Dhgms.Nucleotide.Generators\bin\$(Configuration)\netstandard2.0\Dhgms.Nucleotide.Generators.dll" />
</ItemGroup>

<!--<PropertyGroup>
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
</PropertyGroup>
<Target Name="GetDependencyTargetPaths">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker Include="$(PKGDhgms_Nucleotide_Generators)\lib\netstandard2.0\Dhgms.Nucleotide.Generators.dll" IncludeRuntimeDependency="false" />
</ItemGroup>
</Target>-->
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<ItemGroup>
<ProjectReference Include="..\Dhgms.Nucleotide.Generators\Dhgms.Nucleotide.Generators.csproj" />
<ProjectReference Include="..\Dhgms.Nucleotide.ModelTests\Dhgms.Nucleotide.ModelTests.csproj" />
<ProjectReference Include="..\Dhgms.Nucleotide.ModelTests\Dhgms.Nucleotide.SampleGenerator.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Dhgms.Nucleotide.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide", "Dhgms.N
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.UnitTests", "Dhgms.Nucleotide.UnitTests\Dhgms.Nucleotide.UnitTests.csproj", "{46CF8EB7-1526-44BC-BB6E-DAF6F0A33155}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.ModelTests", "Dhgms.Nucleotide.ModelTests\Dhgms.Nucleotide.ModelTests.csproj", "{8B50F266-A8FC-4766-B953-88C29BDC93D0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.SampleGenerator", "Dhgms.Nucleotide.ModelTests\Dhgms.Nucleotide.SampleGenerator.csproj", "{8B50F266-A8FC-4766-B953-88C29BDC93D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.Analyzers", "Dhgms.Nucleotide.Analyzers\Dhgms.Nucleotide.Analyzers.csproj", "{DA9882C5-9A73-4CB5-8AE2-18ABA0854DE8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.GenerationTests", "Dhgms.Nucleotide.GenerationTests\Dhgms.Nucleotide.GenerationTests.csproj", "{91B35FF3-3B4A-4F63-B437-302756C4EF71}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dhgms.Nucleotide.SampleApp", "Dhgms.Nucleotide.GenerationTests\Dhgms.Nucleotide.SampleApp.csproj", "{91B35FF3-3B4A-4F63-B437-302756C4EF71}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3B51307A-81A9-485E-841F-A023FDE3B148}"
ProjectSection(SolutionItems) = preProject
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.0",
"version": "3.1",
"publicReleaseRefSpec": [
"^refs/heads/main$", // we release out of master
"^refs/heads/preview/.*", // we release previews
Expand Down

0 comments on commit 52361ac

Please sign in to comment.