Rename TypeMethodXXX to ReflectedXXX
This commit is contained in:
parent
6244d55e1f
commit
c321e40d44
|
|
@ -24,11 +24,11 @@ namespace Microsoft.AspNet.Mvc
|
||||||
|
|
||||||
public void Invoke(ActionInvokerProviderContext context, Action callNext)
|
public void Invoke(ActionInvokerProviderContext context, Action callNext)
|
||||||
{
|
{
|
||||||
var ad = context.ActionContext.ActionDescriptor as TypeMethodBasedActionDescriptor;
|
var ad = context.ActionContext.ActionDescriptor as ReflectedActionDescriptor;
|
||||||
|
|
||||||
if (ad != null)
|
if (ad != null)
|
||||||
{
|
{
|
||||||
context.Result = new TypeMethodBasedActionInvoker(
|
context.Result = new ReflectedActionInvoker(
|
||||||
context.ActionContext,
|
context.ActionContext,
|
||||||
ad,
|
ad,
|
||||||
_actionResultFactory,
|
_actionResultFactory,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
|
|
||||||
public object CreateController(HttpContext context, ActionDescriptor actionDescriptor)
|
public object CreateController(HttpContext context, ActionDescriptor actionDescriptor)
|
||||||
{
|
{
|
||||||
var typedAd = actionDescriptor as TypeMethodBasedActionDescriptor;
|
var typedAd = actionDescriptor as ReflectedActionDescriptor;
|
||||||
|
|
||||||
if (typedAd == null)
|
if (typedAd == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using System.Reflection;
|
||||||
namespace Microsoft.AspNet.Mvc
|
namespace Microsoft.AspNet.Mvc
|
||||||
{
|
{
|
||||||
[DebuggerDisplay("CA {Path}:{Name}(RC-{RouteConstraints.Count})")]
|
[DebuggerDisplay("CA {Path}:{Name}(RC-{RouteConstraints.Count})")]
|
||||||
public class TypeMethodBasedActionDescriptor : ActionDescriptor
|
public class ReflectedActionDescriptor : ActionDescriptor
|
||||||
{
|
{
|
||||||
public override string Path
|
public override string Path
|
||||||
{
|
{
|
||||||
|
|
@ -5,14 +5,14 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Mvc
|
namespace Microsoft.AspNet.Mvc
|
||||||
{
|
{
|
||||||
public class TypeMethodBasedActionDescriptorProvider : IActionDescriptorProvider
|
public class ReflectedActionDescriptorProvider : IActionDescriptorProvider
|
||||||
{
|
{
|
||||||
private readonly IControllerAssemblyProvider _controllerAssemblyProvider;
|
private readonly IControllerAssemblyProvider _controllerAssemblyProvider;
|
||||||
private readonly IActionDiscoveryConventions _conventions;
|
private readonly IActionDiscoveryConventions _conventions;
|
||||||
private readonly IControllerDescriptorFactory _controllerDescriptorFactory;
|
private readonly IControllerDescriptorFactory _controllerDescriptorFactory;
|
||||||
private readonly IParameterDescriptorFactory _parameterDescriptorFactory;
|
private readonly IParameterDescriptorFactory _parameterDescriptorFactory;
|
||||||
|
|
||||||
public TypeMethodBasedActionDescriptorProvider(IControllerAssemblyProvider controllerAssemblyProvider,
|
public ReflectedActionDescriptorProvider(IControllerAssemblyProvider controllerAssemblyProvider,
|
||||||
IActionDiscoveryConventions conventions,
|
IActionDiscoveryConventions conventions,
|
||||||
IControllerDescriptorFactory controllerDescriptorFactory,
|
IControllerDescriptorFactory controllerDescriptorFactory,
|
||||||
IParameterDescriptorFactory parameterDescriptorFactory)
|
IParameterDescriptorFactory parameterDescriptorFactory)
|
||||||
|
|
@ -60,9 +60,9 @@ namespace Microsoft.AspNet.Mvc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TypeMethodBasedActionDescriptor BuildDescriptor(ControllerDescriptor controllerDescriptor, MethodInfo methodInfo, ActionInfo actionInfo)
|
private ReflectedActionDescriptor BuildDescriptor(ControllerDescriptor controllerDescriptor, MethodInfo methodInfo, ActionInfo actionInfo)
|
||||||
{
|
{
|
||||||
var ad = new TypeMethodBasedActionDescriptor
|
var ad = new ReflectedActionDescriptor
|
||||||
{
|
{
|
||||||
RouteConstraints = new List<RouteDataActionConstraint>
|
RouteConstraints = new List<RouteDataActionConstraint>
|
||||||
{
|
{
|
||||||
|
|
@ -6,16 +6,16 @@ using Microsoft.AspNet.Abstractions;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Mvc
|
namespace Microsoft.AspNet.Mvc
|
||||||
{
|
{
|
||||||
public class TypeMethodBasedActionInvoker : IActionInvoker
|
public class ReflectedActionInvoker : IActionInvoker
|
||||||
{
|
{
|
||||||
private readonly ActionContext _actionContext;
|
private readonly ActionContext _actionContext;
|
||||||
private readonly TypeMethodBasedActionDescriptor _descriptor;
|
private readonly ReflectedActionDescriptor _descriptor;
|
||||||
private readonly IActionResultFactory _actionResultFactory;
|
private readonly IActionResultFactory _actionResultFactory;
|
||||||
private readonly IServiceProvider _serviceProvider;
|
private readonly IServiceProvider _serviceProvider;
|
||||||
private readonly IControllerFactory _controllerFactory;
|
private readonly IControllerFactory _controllerFactory;
|
||||||
|
|
||||||
public TypeMethodBasedActionInvoker(ActionContext actionContext,
|
public ReflectedActionInvoker(ActionContext actionContext,
|
||||||
TypeMethodBasedActionDescriptor descriptor,
|
ReflectedActionDescriptor descriptor,
|
||||||
IActionResultFactory actionResultFactory,
|
IActionResultFactory actionResultFactory,
|
||||||
IControllerFactory controllerFactory,
|
IControllerFactory controllerFactory,
|
||||||
IServiceProvider serviceProvider)
|
IServiceProvider serviceProvider)
|
||||||
|
|
@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
// This is temporary until DI has some magic for it
|
// This is temporary until DI has some magic for it
|
||||||
Add<INestedProviderManager<ActionDescriptorProviderContext>, NestedProviderManager<ActionDescriptorProviderContext>>();
|
Add<INestedProviderManager<ActionDescriptorProviderContext>, NestedProviderManager<ActionDescriptorProviderContext>>();
|
||||||
Add<INestedProviderManager<ActionInvokerProviderContext>, NestedProviderManager<ActionInvokerProviderContext>>();
|
Add<INestedProviderManager<ActionInvokerProviderContext>, NestedProviderManager<ActionInvokerProviderContext>>();
|
||||||
Add<INestedProvider<ActionDescriptorProviderContext>, TypeMethodBasedActionDescriptorProvider>();
|
Add<INestedProvider<ActionDescriptorProviderContext>, ReflectedActionDescriptorProvider>();
|
||||||
Add<INestedProvider<ActionInvokerProviderContext>, ActionInvokerProvider>();
|
Add<INestedProvider<ActionInvokerProviderContext>, ActionInvokerProvider>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue