Skip to content

Commit beb0f13

Browse files
committed
- Preparations for v3
- Examples updated
1 parent a412455 commit beb0f13

File tree

90 files changed

+158
-152
lines changed

Some content is hidden

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

90 files changed

+158
-152
lines changed

Angular.Tests/KY.Generator.Angular.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
10+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
1212
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
1313
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />

Angular/KY.Generator.Angular.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Authors>KY-Programming</Authors>
66
<Company>KY-Programming</Company>
77
<Product>KY.Generator</Product>
8-
<Version>3.0.0-rc.0</Version>
8+
<Version>3.0.0</Version>
99
<Copyright>2019 - KY-Programming</Copyright>
1010
<Description>Angular Module for KY-Generator
1111
Download KY.Generator.CLI to use this module</Description>
@@ -17,7 +17,7 @@ Download KY.Generator.CLI to use this module</Description>
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
20+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

AspDotNet.Tests/KY.Generator.AspDotNet.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
10+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
1212
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
1313
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />

AspDotNet/KY.Generator.AspDotNet.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<Company>KY-Programming</Company>
66
<Authors>KY-Programming</Authors>
7-
<Version>3.0.0-rc.0</Version>
7+
<Version>3.0.0</Version>
88
<Product>KY.Generator</Product>
99
<Description>ASP.net Module for KY-Generator
1010
Download KY.Generator.CLI to use this module</Description>
@@ -17,7 +17,7 @@ Download KY.Generator.CLI to use this module</Description>
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
20+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

AspDotNet/Readers/AspDotNetControllerReader.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Reflection;
55
using KY.Core;
66
using KY.Generator.AspDotNet.Configurations;
7+
using KY.Generator.Extensions;
78
using KY.Generator.Reflection.Language;
89
using KY.Generator.Reflection.Readers;
910
using KY.Generator.Transfer;
@@ -42,25 +43,14 @@ public virtual void Read(AspDotNetReadConfiguration configuration, List<ITransfe
4243
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);
4344
foreach (MethodInfo method in methods)
4445
{
45-
Type returnType;
46-
if (method.ReturnType.Namespace == "System.Threading.Tasks" && method.ReturnType.Name == "Task`1")
47-
{
48-
returnType = method.ReturnType.GetGenericArguments().Single();
49-
}
50-
else
51-
{
52-
returnType = method.ReturnType;
53-
}
46+
Type returnType = method.ReturnType.IgnoreGeneric("System.Threading.Tasks", "Task")
47+
.IgnoreGeneric("Microsoft.AspNetCore.Mvc", "ActionResult");
5448
this.modelReader.Read(returnType, transferObjects);
5549
foreach (Attribute attribute in method.GetCustomAttributes())
5650
{
5751
Type attributeType = attribute.GetType();
5852
HttpServiceActionTransferObject action = new HttpServiceActionTransferObject();
5953
action.ReturnType = returnType.ToTransferObject();
60-
if (action.ReturnType.Name == "ActionResult")
61-
{
62-
action.ReturnType = action.ReturnType.Generics.Single().Type;
63-
}
6454
action.Route = attributeType.GetProperty("Template")?.GetValue(attribute)?.ToString();
6555
int methodNameIndex = 1;
6656
while (true)

CLI.Core.Full/KY.Generator.CLI.Core.Full.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
15+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

CLI.Core.Full/nuget.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>KY.Generator.CLI.Core.Full</id>
55
<!-- Ensure nuget.targets version is also updated -->
6-
<version>3.0.0-rc.0</version>
6+
<version>3.0.0</version>
77
<title>KY.Generator.CLI.Core.Full</title>
88
<authors>KY-Programming</authors>
99
<owners>KY-Programming</owners>

CLI.Core.Full/nuget.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Target Name="KYGeneratorCLITarget" AfterTargets="Build">
4-
<Exec Command="dotnet %22%25USERPROFILE%25\.nuget\packages\ky.generator.cli.core.full\3.0.0-rc.0\tools\KY.Generator.dll%22 %22$(ProjectDir)generator.json%22 %22$(ProjectDir)\%22 msbuild"
4+
<Exec Command="dotnet %22%25USERPROFILE%25\.nuget\packages\ky.generator.cli.core.full\3.0.0\tools\KY.Generator.dll%22 %22$(ProjectDir)generator.json%22 %22$(ProjectDir)\%22 msbuild"
55
CustomErrorRegularExpression="^Error:"
66
CustomWarningRegularExpression="^Warning:"
77
></Exec>

CLI.Core.Minimal/KY.Generator.CLI.Core.Minimal.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="KY.Core.Common" Version="4.8.0-rc.4" />
15+
<PackageReference Include="KY.Core.Common" Version="4.8.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

CLI.Core.Minimal/nuget.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>KY.Generator.CLI.Core.Minimal</id>
55
<!-- Ensure nuget.targets version is also updated -->
6-
<version>3.0.0-rc.1</version>
6+
<version>3.0.0</version>
77
<title>KY.Generator.CLI.Core.Minimal</title>
88
<authors>KY-Programming</authors>
99
<owners>KY-Programming</owners>

0 commit comments

Comments
 (0)