mirror of https://github.com/abpframework/abp.git
8 changed files with 77 additions and 16 deletions
Binary file not shown.
@ -1,26 +1,33 @@ |
|||
using System; |
|||
using System.Reflection; |
|||
using JetBrains.Annotations; |
|||
using Microsoft.AspNetCore.Mvc.ApplicationModels; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc |
|||
{ |
|||
public class AbpControllerAssemblySetting |
|||
{ |
|||
[NotNull] |
|||
public Assembly Assembly { get; } |
|||
|
|||
[NotNull] |
|||
public string RootPath { get; } |
|||
|
|||
[CanBeNull] |
|||
public Func<Type, bool> TypePredicate { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public Action<ControllerModel> ControllerModelConfigurer { get; set; } |
|||
|
|||
public AbpControllerAssemblySetting(Assembly assembly, string rootPath) |
|||
[CanBeNull] |
|||
public Func<UrlControllerNameNormalizerContext, string> UrlControllerNameNormalizer { get; set; } |
|||
|
|||
public AbpControllerAssemblySetting([NotNull] Assembly assembly, [NotNull] string rootPath) |
|||
{ |
|||
Check.NotNull(assembly, rootPath); |
|||
|
|||
Assembly = assembly; |
|||
RootPath = rootPath; |
|||
|
|||
TypePredicate = type => true; |
|||
ControllerModelConfigurer = controller => { }; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
using Microsoft.AspNetCore.Mvc.ApplicationModels; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc |
|||
{ |
|||
//TODO: Re-consider properties of this class.
|
|||
public class UrlControllerNameNormalizerContext |
|||
{ |
|||
public string RootPath { get; } |
|||
|
|||
public string ControllerName { get; } |
|||
|
|||
public ActionModel Action { get; } |
|||
|
|||
public string HttpMethod { get; } |
|||
|
|||
public UrlControllerNameNormalizerContext(string rootPath, string controllerName, ActionModel action, string httpMethod) |
|||
{ |
|||
RootPath = rootPath; |
|||
ControllerName = controllerName; |
|||
Action = action; |
|||
HttpMethod = httpMethod; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue