Removed unused private method in DefaultActionSelector
This commit is contained in:
parent
8428ec46e1
commit
7e1a6222aa
|
|
@ -316,7 +316,6 @@ namespace Microsoft.AspNet.Mvc.Controllers
|
|||
ControllerModel controller,
|
||||
ActionModel action)
|
||||
{
|
||||
|
||||
var isVisible =
|
||||
action.ApiExplorer?.IsVisible ??
|
||||
controller.ApiExplorer?.IsVisible ??
|
||||
|
|
|
|||
|
|
@ -235,20 +235,6 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
|
|||
return matchingRouteConstraints.Count > 0;
|
||||
}
|
||||
|
||||
private IReadOnlyList<ActionDescriptor> GetActions()
|
||||
{
|
||||
var descriptors = _actionDescriptorsCollectionProvider.ActionDescriptors;
|
||||
|
||||
if (descriptors == null)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
Resources.FormatPropertyOfTypeCannotBeNull("ActionDescriptors",
|
||||
_actionDescriptorsCollectionProvider.GetType()));
|
||||
}
|
||||
|
||||
return descriptors.Items;
|
||||
}
|
||||
|
||||
private IReadOnlyList<IActionConstraint> GetConstraints(HttpContext httpContext, ActionDescriptor action)
|
||||
{
|
||||
if (action.ActionConstraints == null || action.ActionConstraints.Count == 0)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
|
|||
if (objectType == null || objectType == typeof(object))
|
||||
{
|
||||
objectType = result.Value?.GetType();
|
||||
};
|
||||
}
|
||||
|
||||
var formatterContext = new OutputFormatterWriteContext(
|
||||
context.HttpContext,
|
||||
|
|
|
|||
|
|
@ -642,9 +642,9 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
|
|||
|
||||
serviceContainer.AddSingleton(typeof(IEnumerable<IActionDescriptorProvider>), list);
|
||||
|
||||
var actionCollectionDescriptorProvider = new DefaultActionDescriptorsCollectionProvider(
|
||||
var actionDescriptorsCollectionProvider = new DefaultActionDescriptorsCollectionProvider(
|
||||
serviceContainer.BuildServiceProvider());
|
||||
var decisionTreeProvider = new ActionSelectorDecisionTreeProvider(actionCollectionDescriptorProvider);
|
||||
var decisionTreeProvider = new ActionSelectorDecisionTreeProvider(actionDescriptorsCollectionProvider);
|
||||
|
||||
var actionConstraintProviders = new[]
|
||||
{
|
||||
|
|
@ -652,7 +652,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
|
|||
};
|
||||
|
||||
var defaultActionSelector = new DefaultActionSelector(
|
||||
actionCollectionDescriptorProvider,
|
||||
actionDescriptorsCollectionProvider,
|
||||
decisionTreeProvider,
|
||||
actionConstraintProviders,
|
||||
NullLoggerFactory.Instance);
|
||||
|
|
|
|||
Loading…
Reference in New Issue