Browse Source

Enhance ABP CLI

pull/14131/head
LiangShiWei 4 years ago
parent
commit
28c691a6eb
  1. 14
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs

14
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs

@ -293,7 +293,19 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase<CSharpServi
private bool ShouldGenerateMethod(string appServiceTypeName, ActionApiDescriptionModel action)
{
return action.ImplementFrom.StartsWith(AppServicePrefix) || action.ImplementFrom.StartsWith(appServiceTypeName);
var shouldGenerateMethod = action.ImplementFrom.StartsWith(AppServicePrefix) || action.ImplementFrom.StartsWith(appServiceTypeName);
if (!shouldGenerateMethod)
{
shouldGenerateMethod = IsAppServiceInterface(GetRealTypeName(action.ImplementFrom));
}
return shouldGenerateMethod;
}
private bool IsAppServiceInterface(string typeName)
{
return typeName.StartsWith("I") && ServicePostfixes.Any(typeName.EndsWith);
}
private string GetTypeNamespace(string typeFullName)

Loading…
Cancel
Save