From 56caf032609b8613a9dcabe51c3ba9f06c0b66fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 19 Sep 2017 14:03:42 +0300 Subject: [PATCH] Refactor. --- .../Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs | 8 ++++---- .../Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs | 2 +- .../Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs index fb10869193..447bd59f29 100644 --- a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs +++ b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs @@ -6,18 +6,18 @@ namespace Volo.Abp.AspNetCore.Mvc { public class AbpControllerAssemblySetting { - public string ModuleName { get; } - public Assembly Assembly { get; } + public string ModuleName { get; } + public Func TypePredicate { get; set; } public Action ControllerModelConfigurer { get; set; } - public AbpControllerAssemblySetting(string moduleName, Assembly assembly) + public AbpControllerAssemblySetting(Assembly assembly, string moduleName) { - ModuleName = moduleName; Assembly = assembly; + ModuleName = moduleName; TypePredicate = type => true; ControllerModelConfigurer = controller => { }; diff --git a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs index 71359a2a59..7f12bb75a0 100644 --- a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs +++ b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.AspNetCore.Mvc public AbpControllerAssemblySettingBuilder CreateFor(Assembly assembly, string moduleName = ModuleApiDescriptionModel.DefaultServiceModuleName) { - var setting = new AbpControllerAssemblySetting(moduleName, assembly); + var setting = new AbpControllerAssemblySetting(assembly, moduleName); ControllerAssemblySettings.Add(setting); return new AbpControllerAssemblySettingBuilder(setting); } diff --git a/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs b/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs index 20ce707dff..78b9f1ebbf 100644 --- a/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs +++ b/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs @@ -47,7 +47,7 @@ namespace Volo.Abp.Http.Modeling public ModuleApiDescriptionModel CreateSubModel(string[] controllers, string[] actions) { - var subModel = ModuleApiDescriptionModel.Create(Name); + var subModel = Create(Name); foreach (var controller in Controllers.Values) {