Enhance ABP CLI

pull/14131/head
LiangShiWei 3 years ago
parent afe4574dbc
commit 28c691a6eb

@ -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