From 651e6881d195d67b20b636cf691c42ad0b45ad49 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Tue, 27 Feb 2024 17:15:52 +0800 Subject: [PATCH 1/2] Fix DTO code generation for C# static proxy --- .../ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs index c899270ad21..1c3cf828c6c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs @@ -553,10 +553,14 @@ private static string GetRealTypeName(string typeName, List usingNamespa var s2 = s1[i].Split(","); for (var x = 0; x < s2.Length; x++) { - type.Append(s2[x].Split(".").Last()); + var s3 = s2[x].Split(".").Last(); + type.Append(s3); if (x < s2.Length - 1) { type.Append(", "); + }else if(!s3.Contains(">")) + { + type.Append("<"); } } } From 879e08bae3e973d11ca199828487f18314119f45 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 27 Feb 2024 17:20:59 +0800 Subject: [PATCH 2/2] Update CSharpServiceProxyGenerator.cs --- .../Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs index 1c3cf828c6c..e0dcc14fb1f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs @@ -558,7 +558,8 @@ private static string GetRealTypeName(string typeName, List usingNamespa if (x < s2.Length - 1) { type.Append(", "); - }else if(!s3.Contains(">")) + } + else if(!s3.Contains(">")) { type.Append("<"); }