diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerSetting.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerSetting.cs index d1b0eef6ab..6b06c2854b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerSetting.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerSetting.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Versioning; using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using System.Reflection; using Volo.Abp.Reflection; @@ -16,7 +17,7 @@ public class ConventionalControllerSetting public Assembly Assembly { get; } [NotNull] - public HashSet ControllerTypes { get; } //TODO: Internal? + internal HashSet ControllerTypes { get; } /// /// Set true to use the old style URL path style. @@ -85,6 +86,11 @@ public class ConventionalControllerSetting } } + public IReadOnlyList GetControllerTypes() + { + return ControllerTypes.ToImmutableList(); + } + private static bool IsRemoteService(Type type) { if (!type.IsPublic || type.IsAbstract || type.IsGenericType)