Browse Source

Refactor.

pull/113/head
Halil İbrahim Kalkan 9 years ago
parent
commit
56caf03260
  1. 8
      src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpControllerAssemblySetting.cs
  2. 2
      src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AppServiceControllerOptions.cs
  3. 2
      src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs

8
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<Type, bool> TypePredicate { get; set; }
public Action<ControllerModel> 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 => { };

2
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);
}

2
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)
{

Loading…
Cancel
Save