From 8abf33f2e65930016df651c31bca211c2dc24eed Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 12 Oct 2022 16:47:37 +0800 Subject: [PATCH] Pass `service-type to `@abp/ng.schematics`. --- .../Angular/AngularServiceProxyGenerator.cs | 6 ++++++ .../Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs index 6ee080f41b..0376828fc2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs @@ -76,6 +76,12 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase : IServiceProxyGenerator wher throw new CliUsageException($"Module name: {args.Module} is invalid"); } - var serviceType = args.ServiceType ?? GetDefaultServiceType(args); - + var serviceType = GetServiceType(args); switch (serviceType) { case ServiceType.Application: @@ -60,6 +59,11 @@ public abstract class ServiceProxyGeneratorBase : IServiceProxyGenerator wher return apiDescriptionModel; } + protected virtual ServiceType? GetServiceType(GenerateProxyArgs args) + { + return args.ServiceType ?? GetDefaultServiceType(args); + } + protected abstract ServiceType? GetDefaultServiceType(GenerateProxyArgs args); protected string GetLoggerOutputPath(string path, string workDirectory)