Removed unused private method in DefaultActionSelector

This commit is contained in:
apxoht 2015-11-26 19:50:50 +02:00 committed by Pranav K
parent 8428ec46e1
commit 7e1a6222aa
4 changed files with 4 additions and 19 deletions

View File

@ -316,7 +316,6 @@ namespace Microsoft.AspNet.Mvc.Controllers
ControllerModel controller, ControllerModel controller,
ActionModel action) ActionModel action)
{ {
var isVisible = var isVisible =
action.ApiExplorer?.IsVisible ?? action.ApiExplorer?.IsVisible ??
controller.ApiExplorer?.IsVisible ?? controller.ApiExplorer?.IsVisible ??

View File

@ -235,20 +235,6 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
return matchingRouteConstraints.Count > 0; 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) private IReadOnlyList<IActionConstraint> GetConstraints(HttpContext httpContext, ActionDescriptor action)
{ {
if (action.ActionConstraints == null || action.ActionConstraints.Count == 0) if (action.ActionConstraints == null || action.ActionConstraints.Count == 0)

View File

@ -101,7 +101,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
if (objectType == null || objectType == typeof(object)) if (objectType == null || objectType == typeof(object))
{ {
objectType = result.Value?.GetType(); objectType = result.Value?.GetType();
}; }
var formatterContext = new OutputFormatterWriteContext( var formatterContext = new OutputFormatterWriteContext(
context.HttpContext, context.HttpContext,

View File

@ -642,9 +642,9 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
serviceContainer.AddSingleton(typeof(IEnumerable<IActionDescriptorProvider>), list); serviceContainer.AddSingleton(typeof(IEnumerable<IActionDescriptorProvider>), list);
var actionCollectionDescriptorProvider = new DefaultActionDescriptorsCollectionProvider( var actionDescriptorsCollectionProvider = new DefaultActionDescriptorsCollectionProvider(
serviceContainer.BuildServiceProvider()); serviceContainer.BuildServiceProvider());
var decisionTreeProvider = new ActionSelectorDecisionTreeProvider(actionCollectionDescriptorProvider); var decisionTreeProvider = new ActionSelectorDecisionTreeProvider(actionDescriptorsCollectionProvider);
var actionConstraintProviders = new[] var actionConstraintProviders = new[]
{ {
@ -652,7 +652,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
}; };
var defaultActionSelector = new DefaultActionSelector( var defaultActionSelector = new DefaultActionSelector(
actionCollectionDescriptorProvider, actionDescriptorsCollectionProvider,
decisionTreeProvider, decisionTreeProvider,
actionConstraintProviders, actionConstraintProviders,
NullLoggerFactory.Instance); NullLoggerFactory.Instance);