Move some types to .Internal namespace

This commit is contained in:
Ryan Nowak 2016-01-21 10:28:59 -08:00
parent 6737a1f243
commit dd952d8d70
256 changed files with 670 additions and 551 deletions

View File

@ -3,7 +3,7 @@
using System; using System;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace ActionConstraintSample.Web namespace ActionConstraintSample.Web
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace CustomRouteSample.Web namespace CustomRouteSample.Web
{ {

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace MvcSubAreaSample.Web namespace MvcSubAreaSample.Web
{ {

View File

@ -10,6 +10,7 @@ using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Template; using Microsoft.AspNet.Routing.Template;
@ -263,7 +264,7 @@ namespace Microsoft.AspNet.Mvc.ApiExplorer
{ {
if (action.ActionConstraints != null && action.ActionConstraints.Count > 0) if (action.ActionConstraints != null && action.ActionConstraints.Count > 0)
{ {
return action.ActionConstraints.OfType<HttpMethodConstraint>().SelectMany(c => c.HttpMethods); return action.ActionConstraints.OfType<HttpMethodActionConstraint>().SelectMany(c => c.HttpMethods);
} }
else else
{ {

View File

@ -4,7 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {

View File

@ -9,6 +9,7 @@ using System.Reflection;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.ApplicationModels
{ {

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.ApplicationModels
{ {

View File

@ -8,7 +8,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.ApplicationModels
{ {

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Http.Authentication; using Microsoft.AspNet.Http.Authentication;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;

View File

@ -10,6 +10,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Internal;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Controllers
{ {

View File

@ -92,12 +92,12 @@ namespace Microsoft.Extensions.DependencyInjection
ServiceDescriptor.Transient<IApplicationModelProvider, DefaultApplicationModelProvider>()); ServiceDescriptor.Transient<IApplicationModelProvider, DefaultApplicationModelProvider>());
services.TryAddEnumerable( services.TryAddEnumerable(
ServiceDescriptor.Transient<IActionDescriptorProvider, ControllerActionDescriptorProvider>()); ServiceDescriptor.Transient<IActionDescriptorProvider, ControllerActionDescriptorProvider>());
services.TryAddSingleton<IActionDescriptorCollectionProvider, DefaultActionDescriptorCollectionProvider>(); services.TryAddSingleton<IActionDescriptorCollectionProvider, ActionDescriptorCollectionProvider>();
// //
// Action Selection // Action Selection
// //
services.TryAddSingleton<IActionSelector, DefaultActionSelector>(); services.TryAddSingleton<IActionSelector, ActionSelector>();
// Performs caching // Performs caching
services.TryAddSingleton<IActionSelectorDecisionTreeProvider, ActionSelectorDecisionTreeProvider>(); services.TryAddSingleton<IActionSelectorDecisionTreeProvider, ActionSelectorDecisionTreeProvider>();
@ -126,7 +126,7 @@ namespace Microsoft.Extensions.DependencyInjection
ServiceDescriptor.Transient<IActionInvokerProvider, ControllerActionInvokerProvider>()); ServiceDescriptor.Transient<IActionInvokerProvider, ControllerActionInvokerProvider>());
// These are stateless // These are stateless
services.TryAddSingleton<IControllerActionArgumentBinder, DefaultControllerActionArgumentBinder>(); services.TryAddSingleton<IControllerActionArgumentBinder, ControllerArgumentBinder>();
services.TryAddSingleton<FilterCache>(); services.TryAddSingleton<FilterCache>();
services.TryAddEnumerable( services.TryAddEnumerable(
ServiceDescriptor.Singleton<IFilterProvider, DefaultFilterProvider>()); ServiceDescriptor.Singleton<IFilterProvider, DefaultFilterProvider>());
@ -147,7 +147,7 @@ namespace Microsoft.Extensions.DependencyInjection
// Random Infrastructure // Random Infrastructure
// //
services.TryAddSingleton<MvcMarkerService, MvcMarkerService>(); services.TryAddSingleton<MvcMarkerService, MvcMarkerService>();
services.TryAddSingleton<ITypeActivatorCache, DefaultTypeActivatorCache>(); services.TryAddSingleton<ITypeActivatorCache, TypeActivatorCache>();
services.TryAddSingleton<IUrlHelperFactory, UrlHelperFactory>(); services.TryAddSingleton<IUrlHelperFactory, UrlHelperFactory>();
services.TryAddSingleton<IHttpRequestStreamReaderFactory, MemoryPoolHttpRequestStreamReaderFactory>(); services.TryAddSingleton<IHttpRequestStreamReaderFactory, MemoryPoolHttpRequestStreamReaderFactory>();
services.TryAddSingleton<IHttpResponseStreamWriterFactory, MemoryPoolHttpResponseStreamWriterFactory>(); services.TryAddSingleton<IHttpResponseStreamWriterFactory, MemoryPoolHttpResponseStreamWriterFactory>();

View File

@ -1,41 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Diagnostics;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Routing;
namespace Microsoft.AspNet.Mvc.Diagnostics
{
public static class MvcRouteHandlerDiagnosticSourceExtensions
{
public static void BeforeAction(
this DiagnosticSource diagnosticSource,
ActionDescriptor actionDescriptor,
HttpContext httpContext,
RouteData routeData)
{
if (diagnosticSource.IsEnabled("Microsoft.AspNet.Mvc.BeforeAction"))
{
diagnosticSource.Write(
"Microsoft.AspNet.Mvc.BeforeAction",
new { actionDescriptor, httpContext = httpContext, routeData = routeData });
}
}
public static void AfterAction(
this DiagnosticSource diagnosticSource,
ActionDescriptor actionDescriptor,
HttpContext httpContext,
RouteData routeData)
{
if (diagnosticSource.IsEnabled("Microsoft.AspNet.Mvc.AfterAction"))
{
diagnosticSource.Write(
"Microsoft.AspNet.Mvc.AfterAction",
new { actionDescriptor, httpContext = httpContext, routeData = routeData });
}
}
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.ApiExplorer;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Formatters.Internal;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Text; using System.Text;
using Microsoft.AspNet.Mvc.Formatters.Internal;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;

View File

@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure
/// </summary> /// </summary>
/// <param name="context">The <see cref="RouteContext"/> for the current request.</param> /// <param name="context">The <see cref="RouteContext"/> for the current request.</param>
/// <returns>An <see cref="ActionDescriptor"/> or <c>null</c> if no action can be selected.</returns> /// <returns>An <see cref="ActionDescriptor"/> or <c>null</c> if no action can be selected.</returns>
/// <exception cref="AmbiguousActionException"> /// <exception cref="Internal.AmbiguousActionException">
/// Thrown when action selection results in an ambiguity. /// Thrown when action selection results in an ambiguity.
/// </exception> /// </exception>
ActionDescriptor Select(RouteContext context); ActionDescriptor Select(RouteContext context);

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters.Internal
{ {
public static class AcceptHeaderParser public static class AcceptHeaderParser
{ {

View File

@ -5,24 +5,25 @@ using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Default implementation of <see cref="IActionDescriptorCollectionProvider"/>. /// Default implementation of <see cref="IActionDescriptorCollectionProvider"/>.
/// This implementation caches the results at first call, and is not responsible for updates. /// This implementation caches the results at first call, and is not responsible for updates.
/// </summary> /// </summary>
public class DefaultActionDescriptorCollectionProvider : IActionDescriptorCollectionProvider public class ActionDescriptorCollectionProvider : IActionDescriptorCollectionProvider
{ {
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
private ActionDescriptorCollection _collection; private ActionDescriptorCollection _collection;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="DefaultActionDescriptorCollectionProvider" /> class. /// Initializes a new instance of the <see cref="ActionDescriptorCollectionProvider" /> class.
/// </summary> /// </summary>
/// <param name="serviceProvider">The application IServiceProvider.</param> /// <param name="serviceProvider">The application IServiceProvider.</param>
public DefaultActionDescriptorCollectionProvider(IServiceProvider serviceProvider) public ActionDescriptorCollectionProvider(IServiceProvider serviceProvider)
{ {
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
} }

View File

@ -4,8 +4,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Infrastructure;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
public class ActionInvokerFactory : IActionInvokerFactory public class ActionInvokerFactory : IActionInvokerFactory
{ {

View File

@ -8,10 +8,11 @@ using System.ComponentModel;
#endif #endif
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.DecisionTree; using Microsoft.AspNet.Routing.DecisionTree;
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <inheritdoc /> /// <inheritdoc />
public class ActionSelectionDecisionTree : IActionSelectionDecisionTree public class ActionSelectionDecisionTree : IActionSelectionDecisionTree

View File

@ -8,36 +8,37 @@ using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Mvc.Routing;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default <see cref="IActionSelector"/> implementation. /// A default <see cref="IActionSelector"/> implementation.
/// </summary> /// </summary>
public class DefaultActionSelector : IActionSelector public class ActionSelector : IActionSelector
{ {
private readonly IActionSelectorDecisionTreeProvider _decisionTreeProvider; private readonly IActionSelectorDecisionTreeProvider _decisionTreeProvider;
private readonly IActionConstraintProvider[] _actionConstraintProviders; private readonly IActionConstraintProvider[] _actionConstraintProviders;
private ILogger _logger; private ILogger _logger;
/// <summary> /// <summary>
/// Creates a new <see cref="DefaultActionSelector"/>. /// Creates a new <see cref="ActionSelector"/>.
/// </summary> /// </summary>
/// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param> /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param>
/// <param name="actionConstraintProviders">The set of <see cref="IActionInvokerProvider"/> instances.</param> /// <param name="actionConstraintProviders">The set of <see cref="IActionInvokerProvider"/> instances.</param>
/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
public DefaultActionSelector( public ActionSelector(
IActionSelectorDecisionTreeProvider decisionTreeProvider, IActionSelectorDecisionTreeProvider decisionTreeProvider,
IEnumerable<IActionConstraintProvider> actionConstraintProviders, IEnumerable<IActionConstraintProvider> actionConstraintProviders,
ILoggerFactory loggerFactory) ILoggerFactory loggerFactory)
{ {
_decisionTreeProvider = decisionTreeProvider; _decisionTreeProvider = decisionTreeProvider;
_actionConstraintProviders = actionConstraintProviders.OrderBy(item => item.Order).ToArray(); _actionConstraintProviders = actionConstraintProviders.OrderBy(item => item.Order).ToArray();
_logger = loggerFactory.CreateLogger<DefaultActionSelector>(); _logger = loggerFactory.CreateLogger<ActionSelector>();
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -5,7 +5,7 @@ using System;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <inheritdoc /> /// <inheritdoc />
public class ActionSelectorDecisionTreeProvider : IActionSelectorDecisionTreeProvider public class ActionSelectorDecisionTreeProvider : IActionSelectorDecisionTreeProvider

View File

@ -1,13 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.Filters using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An implementation of <see cref="IAllowAnonymousFilter"/> /// An implementation of <see cref="IAllowAnonymousFilter"/>
/// </summary> /// </summary>
public class AllowAnonymousFilter : IAllowAnonymousFilter public class AllowAnonymousFilter : IAllowAnonymousFilter
{ {
} }
} }

View File

@ -6,7 +6,7 @@ using System;
using System.Runtime.Serialization; using System.Runtime.Serialization;
#endif #endif
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An exception which indicates multiple matches in action selection. /// An exception which indicates multiple matches in action selection.

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.ApiExplorer namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Represents data used to build an <c>ApiDescription</c>, stored as part of the /// Represents data used to build an <c>ApiDescription</c>, stored as part of the

View File

@ -4,8 +4,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.ApplicationModels;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Applies conventions to a <see cref="ApplicationModel"/>. /// Applies conventions to a <see cref="ApplicationModel"/>.

View File

@ -9,6 +9,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Internal; using Microsoft.AspNet.Routing.Internal;
using Microsoft.AspNet.Routing.Template; using Microsoft.AspNet.Routing.Template;
@ -16,7 +17,7 @@ using Microsoft.AspNet.Routing.Tree;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.ObjectPool;
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Internal
{ {
public class AttributeRoute : IRouter public class AttributeRoute : IRouter
{ {

View File

@ -4,13 +4,14 @@
using System; using System;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Internal; using Microsoft.AspNet.Routing.Internal;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.ObjectPool;
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Internal
{ {
public static class AttributeRouting public static class AttributeRouting
{ {

View File

@ -4,10 +4,11 @@
using System; using System;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.Internal
{ {
public class AuthorizationApplicationModelProvider : IApplicationModelProvider public class AuthorizationApplicationModelProvider : IApplicationModelProvider
{ {

View File

@ -6,10 +6,11 @@ using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An implementation of <see cref="IAsyncAuthorizationFilter"/> /// An implementation of <see cref="IAsyncAuthorizationFilter"/>

View File

@ -9,15 +9,15 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.ApiExplorer;
using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Mvc.Routing;
using Microsoft.AspNet.Routing.Tree; using Microsoft.AspNet.Routing.Tree;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Creates instances of <see cref="ControllerActionDescriptor"/> from <see cref="ApplicationModel"/>. /// Creates instances of <see cref="ControllerActionDescriptor"/> from <see cref="ApplicationModel"/>.
@ -424,7 +424,7 @@ namespace Microsoft.AspNet.Mvc.Controllers
var httpMethods = action.HttpMethods; var httpMethods = action.HttpMethods;
if (httpMethods != null && httpMethods.Count > 0) if (httpMethods != null && httpMethods.Count > 0)
{ {
constraints.Add(new HttpMethodConstraint(httpMethods)); constraints.Add(new HttpMethodActionConstraint(httpMethods));
} }
if (action.ActionConstraints != null) if (action.ActionConstraints != null)
@ -716,7 +716,7 @@ namespace Microsoft.AspNet.Mvc.Controllers
{ {
var routeTemplate = action.AttributeRouteInfo?.Template ?? nullTemplate; var routeTemplate = action.AttributeRouteInfo?.Template ?? nullTemplate;
var verbs = action.ActionConstraints.OfType<HttpMethodConstraint>().FirstOrDefault()?.HttpMethods; var verbs = action.ActionConstraints.OfType<HttpMethodActionConstraint>().FirstOrDefault()?.HttpMethods;
var formattedVerbs = string.Join(", ", verbs.OrderBy(v => v, StringComparer.Ordinal)); var formattedVerbs = string.Join(", ", verbs.OrderBy(v => v, StringComparer.Ordinal));
var description = var description =

View File

@ -6,9 +6,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public class ControllerActionDescriptorProvider : IActionDescriptorProvider public class ControllerActionDescriptorProvider : IActionDescriptorProvider
{ {

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public static class ControllerActionExecutor public static class ControllerActionExecutor
{ {

View File

@ -4,8 +4,9 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A filter implementation which delegates to the controller for action filter interfaces. /// A filter implementation which delegates to the controller for action filter interfaces.

View File

@ -6,17 +6,17 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public class ControllerActionInvoker : FilterActionInvoker public class ControllerActionInvoker : FilterActionInvoker
{ {

View File

@ -6,14 +6,14 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public class ControllerActionInvokerProvider : IActionInvokerProvider public class ControllerActionInvokerProvider : IActionInvokerProvider
{ {

View File

@ -3,31 +3,31 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Provides a default implementation of <see cref="IControllerActionArgumentBinder"/>. /// Provides a default implementation of <see cref="IControllerActionArgumentBinder"/>.
/// Uses ModelBinding to populate action parameters. /// Uses ModelBinding to populate action parameters.
/// </summary> /// </summary>
public class DefaultControllerActionArgumentBinder : IControllerActionArgumentBinder public class ControllerArgumentBinder : IControllerActionArgumentBinder
{ {
private static readonly MethodInfo CallPropertyAddRangeOpenGenericMethod = private static readonly MethodInfo CallPropertyAddRangeOpenGenericMethod =
typeof(DefaultControllerActionArgumentBinder).GetTypeInfo().GetDeclaredMethod( typeof(ControllerArgumentBinder).GetTypeInfo().GetDeclaredMethod(
nameof(CallPropertyAddRange)); nameof(CallPropertyAddRange));
private readonly IModelMetadataProvider _modelMetadataProvider; private readonly IModelMetadataProvider _modelMetadataProvider;
private readonly IObjectModelValidator _validator; private readonly IObjectModelValidator _validator;
public DefaultControllerActionArgumentBinder( public ControllerArgumentBinder(
IModelMetadataProvider modelMetadataProvider, IModelMetadataProvider modelMetadataProvider,
IObjectModelValidator validator) IObjectModelValidator validator)
{ {

View File

@ -4,8 +4,9 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A filter implementation which delegates to the controller for result filter interfaces. /// A filter implementation which delegates to the controller for result filter interfaces.

View File

@ -2,8 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.ActionConstraints;
namespace Microsoft.AspNet.Mvc.ActionConstraints namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default implementation of <see cref="IActionConstraintProvider"/>. /// A default implementation of <see cref="IActionConstraintProvider"/>.

View File

@ -7,13 +7,15 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.ApiExplorer;
using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNet.Mvc.ApplicationModels namespace Microsoft.AspNet.Mvc.Internal
{ {
public class DefaultApplicationModelProvider : IApplicationModelProvider public class DefaultApplicationModelProvider : IApplicationModelProvider
{ {

View File

@ -5,8 +5,10 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default implementation of <see cref="IBindingMetadataProvider"/>. /// A default implementation of <see cref="IBindingMetadataProvider"/>.

View File

@ -1,12 +1,13 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// The default implementation of <see cref="IValidationStrategy"/> for a collection. /// The default implementation of <see cref="IValidationStrategy"/> for a collection.

View File

@ -5,8 +5,10 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// The default implementation of <see cref="IValidationStrategy"/> for a complex object. /// The default implementation of <see cref="IValidationStrategy"/> for a complex object.

View File

@ -4,8 +4,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default implementation of <see cref="ICompositeMetadataDetailsProvider"/>. /// A default implementation of <see cref="ICompositeMetadataDetailsProvider"/>.

View File

@ -5,10 +5,10 @@ using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public class DefaultControllerPropertyActivator : IControllerPropertyActivator public class DefaultControllerPropertyActivator : IControllerPropertyActivator
{ {

View File

@ -4,8 +4,9 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
public class DefaultFilterProvider : IFilterProvider public class DefaultFilterProvider : IFilterProvider
{ {

View File

@ -1,14 +1,16 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default <see cref="IModelValidatorProvider"/>. /// A default <see cref="IModelValidatorProvider"/>.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// The <see cref="DefaultModelValidatorProvider"/> provides validators from <see cref="IModelValidator"/> /// The <see cref="DefaultModelValidatorProvider"/> provides validators from <see cref="IModelValidator"/>
/// instances in <see cref="ModelMetadata.ValidatorMetadata"/>. /// instances in <see cref="ModelBinding.ModelMetadata.ValidatorMetadata"/>.
/// </remarks> /// </remarks>
public class DefaultModelValidatorProvider : IModelValidatorProvider public class DefaultModelValidatorProvider : IModelValidatorProvider
{ {

View File

@ -2,8 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// The default implementation of <see cref="IObjectModelValidator"/>. /// The default implementation of <see cref="IObjectModelValidator"/>.

View File

@ -2,9 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// A default implementation of <see cref="IValidationMetadataProvider"/>. /// A default implementation of <see cref="IValidationMetadataProvider"/>.

View File

@ -3,8 +3,9 @@
using System; using System;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.Internal
{ {
public class ElementalValueProvider : IValueProvider public class ElementalValueProvider : IValueProvider
{ {

View File

@ -4,8 +4,10 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An implementation of <see cref="IValidationStrategy"/> for a collection bound using 'explict indexing' /// An implementation of <see cref="IValidationStrategy"/> for a collection bound using 'explict indexing'

View File

@ -8,16 +8,14 @@ using System.Runtime.ExceptionServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Diagnostics;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Controllers namespace Microsoft.AspNet.Mvc.Internal
{ {
public abstract class FilterActionInvoker : IActionInvoker public abstract class FilterActionInvoker : IActionInvoker
{ {

View File

@ -3,8 +3,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
public class FilterDescriptorOrderComparer : IComparer<FilterDescriptor> public class FilterDescriptorOrderComparer : IComparer<FilterDescriptor>
{ {

View File

@ -3,8 +3,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
public class FilterItemOrderComparer : IComparer<FilterItem> public class FilterItemOrderComparer : IComparer<FilterItem>
{ {

View File

@ -4,12 +4,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using Microsoft.AspNet.Mvc.ActionConstraints;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNet.Mvc.ActionConstraints namespace Microsoft.AspNet.Mvc.Internal
{ {
public class HttpMethodConstraint : IActionConstraint public class HttpMethodActionConstraint : IActionConstraint
{ {
public static readonly int HttpMethodConstraintOrder = 100; public static readonly int HttpMethodConstraintOrder = 100;
@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc.ActionConstraints
private readonly string PreflightHttpMethod = "OPTIONS"; private readonly string PreflightHttpMethod = "OPTIONS";
// Empty collection means any method will be accepted. // Empty collection means any method will be accepted.
public HttpMethodConstraint(IEnumerable<string> httpMethods) public HttpMethodActionConstraint(IEnumerable<string> httpMethods)
{ {
if (httpMethods == null) if (httpMethods == null)
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters.Internal
{ {
internal enum HttpParseResult public enum HttpParseResult
{ {
Parsed, Parsed,
NotParsed, NotParsed,

View File

@ -1,14 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Globalization;
using System.Text; using System.Text;
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters.Internal
{ {
internal static class HttpTokenParsingRules public static class HttpTokenParsingRules
{ {
private static readonly bool[] TokenChars; private static readonly bool[] TokenChars;
private const int MaxNestedCount = 5; private const int MaxNestedCount = 5;

View File

@ -3,7 +3,7 @@
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
public interface IActionInvokerFactory public interface IActionInvokerFactory
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Stores an <see cref="ActionSelectionDecisionTree"/> for the current value of /// Stores an <see cref="ActionSelectionDecisionTree"/> for the current value of

View File

@ -1,7 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.ActionConstraints using Microsoft.AspNet.Mvc.ActionConstraints;
namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An <see cref="IActionConstraint"/> constraint that identifies a type which can be used to select an action /// An <see cref="IActionConstraint"/> constraint that identifies a type which can be used to select an action

View File

@ -3,7 +3,7 @@
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters.Internal
{ {
/// <summary> /// <summary>
/// A filter which produces a desired content type for the current request. /// A filter which produces a desired content type for the current request.

View File

@ -4,7 +4,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Creates <see cref="TextReader"/> instances for reading from <see cref="Http.HttpRequest.Body"/>. /// Creates <see cref="TextReader"/> instances for reading from <see cref="Http.HttpRequest.Body"/>.

View File

@ -4,7 +4,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Creates <see cref="TextWriter"/> instances for writing to <see cref="Http.HttpResponse.Body"/>. /// Creates <see cref="TextWriter"/> instances for writing to <see cref="Http.HttpResponse.Body"/>.

View File

@ -1,7 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Mvc.Filters using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An <see cref="IActionFilter"/> which sets the appropriate headers related to Response caching. /// An <see cref="IActionFilter"/> which sets the appropriate headers related to Response caching.

View File

@ -3,7 +3,7 @@
using System; using System;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Caches <see cref="Microsoft.Extensions.DependencyInjection.ObjectFactory"/> instances produced by /// Caches <see cref="Microsoft.Extensions.DependencyInjection.ObjectFactory"/> instances produced by

View File

@ -3,7 +3,7 @@
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNet.Mvc.Formatters namespace Microsoft.AspNet.Mvc.Formatters.Internal
{ {
/// <summary> /// <summary>
/// A media type with its associated quality. /// A media type with its associated quality.

View File

@ -5,8 +5,9 @@ using System;
using System.Buffers; using System.Buffers;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Microsoft.AspNet.Mvc.Infrastructure;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An <see cref="IHttpRequestStreamReaderFactory"/> that uses pooled buffers. /// An <see cref="IHttpRequestStreamReaderFactory"/> that uses pooled buffers.

View File

@ -6,7 +6,7 @@ using System.Buffers;
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An <see cref="IHttpResponseStreamWriterFactory"/> that uses pooled buffers. /// An <see cref="IHttpResponseStreamWriterFactory"/> that uses pooled buffers.

View File

@ -3,13 +3,43 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Routing;
namespace Microsoft.AspNet.Mvc.Diagnostics namespace Microsoft.AspNet.Mvc.Internal
{ {
public static class FilterActionInvokerDiagnosticSourceExtensions public static class MvcCoreDiagnosticSourceExtensions
{ {
public static void BeforeAction(
this DiagnosticSource diagnosticSource,
ActionDescriptor actionDescriptor,
HttpContext httpContext,
RouteData routeData)
{
if (diagnosticSource.IsEnabled("Microsoft.AspNet.Mvc.BeforeAction"))
{
diagnosticSource.Write(
"Microsoft.AspNet.Mvc.BeforeAction",
new { actionDescriptor, httpContext = httpContext, routeData = routeData });
}
}
public static void AfterAction(
this DiagnosticSource diagnosticSource,
ActionDescriptor actionDescriptor,
HttpContext httpContext,
RouteData routeData)
{
if (diagnosticSource.IsEnabled("Microsoft.AspNet.Mvc.AfterAction"))
{
diagnosticSource.Write(
"Microsoft.AspNet.Mvc.AfterAction",
new { actionDescriptor, httpContext = httpContext, routeData = routeData });
}
}
public static void BeforeOnAuthorizationAsync( public static void BeforeOnAuthorizationAsync(
this DiagnosticSource diagnosticSource, this DiagnosticSource diagnosticSource,
AuthorizationContext authorizationContext, AuthorizationContext authorizationContext,

View File

@ -4,19 +4,24 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Logging namespace Microsoft.AspNet.Mvc.Internal
{ {
internal static class MvcRouteHandlerLoggerExtensions internal static class MvcCoreLoggerExtensions
{ {
private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency; private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency;
private static readonly Action<ILogger, string, Exception> _actionExecuting; private static readonly Action<ILogger, string, Exception> _actionExecuting;
private static readonly Action<ILogger, string, double, Exception> _actionExecuted; private static readonly Action<ILogger, string, double, Exception> _actionExecuted;
static MvcRouteHandlerLoggerExtensions() private static readonly Action<ILogger, string[], Exception> _challengeResultExecuting;
private static readonly Action<ILogger, string, Exception> _contentResultExecuting;
static MvcCoreLoggerExtensions()
{ {
_actionExecuting = LoggerMessage.Define<string>( _actionExecuting = LoggerMessage.Define<string>(
LogLevel.Debug, LogLevel.Debug,
@ -27,6 +32,16 @@ namespace Microsoft.AspNet.Mvc.Logging
LogLevel.Information, LogLevel.Information,
2, 2,
"Executed action {ActionName} in {ElapsedMilliseconds}ms"); "Executed action {ActionName} in {ElapsedMilliseconds}ms");
_challengeResultExecuting = LoggerMessage.Define<string[]>(
LogLevel.Information,
1,
"Executing ChallengeResult with authentication schemes ({Schemes}).");
_contentResultExecuting = LoggerMessage.Define<string>(
LogLevel.Information,
1,
"Executing ContentResult with HTTP Response ContentType of {ContentType}");
} }
public static IDisposable ActionScope(this ILogger logger, ActionDescriptor action) public static IDisposable ActionScope(this ILogger logger, ActionDescriptor action)
@ -56,6 +71,16 @@ namespace Microsoft.AspNet.Mvc.Logging
logger.LogDebug(3, "No actions matched the current request"); logger.LogDebug(3, "No actions matched the current request");
} }
public static void ChallengeResultExecuting(this ILogger logger, IList<string> schemes)
{
_challengeResultExecuting(logger, schemes.ToArray(), null);
}
public static void ContentResultExecuting(this ILogger logger, string contentType)
{
_contentResultExecuting(logger, contentType, null);
}
private class ActionLogScope : ILogValues private class ActionLogScope : ILogValues
{ {
private readonly ActionDescriptor _action; private readonly ActionDescriptor _action;

View File

@ -7,15 +7,14 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Diagnostics; using Microsoft.AspNet.Mvc.Infrastructure;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Tree; using Microsoft.AspNet.Routing.Tree;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
public class MvcRouteHandler : IRouter public class MvcRouteHandler : IRouter
{ {

View File

@ -9,14 +9,14 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Formatters.Internal;
using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Logging;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Executes an <see cref="ObjectResult"/> to write to the response. /// Executes an <see cref="ObjectResult"/> to write to the response.

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// This is a container for prefix values. It normalizes all the values into dotted-form and then stores /// This is a container for prefix values. It normalizes all the values into dotted-form and then stores

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
internal class ReferenceEqualityComparer : IEqualityComparer<object> internal class ReferenceEqualityComparer : IEqualityComparer<object>
{ {

View File

@ -6,12 +6,13 @@ using System.Globalization;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.Filters namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An <see cref="ActionFilterAttribute"/> which sets the appropriate headers related to response caching. /// An <see cref="IActionFilter"/> which sets the appropriate headers related to response caching.
/// </summary> /// </summary>
public class ResponseCacheFilter : IActionFilter, IResponseCacheFilter public class ResponseCacheFilter : IActionFilter, IResponseCacheFilter
{ {

View File

@ -2,10 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Routing
{ {
/// <summary> /// <summary>
/// An attribute which specifies a required route value for an action or controller. /// An attribute which specifies a required route value for an action or controller.

View File

@ -4,8 +4,10 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// An implementation of <see cref="IValidationStrategy"/> for a dictionary bound with 'short form' style keys. /// An implementation of <see cref="IValidationStrategy"/> for a dictionary bound with 'short form' style keys.

View File

@ -5,13 +5,13 @@ using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.AspNet.Mvc.Infrastructure namespace Microsoft.AspNet.Mvc.Internal
{ {
/// <summary> /// <summary>
/// Caches <see cref="ObjectFactory"/> instances produced by /// Caches <see cref="ObjectFactory"/> instances produced by
/// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type, Type[])"/>. /// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type, Type[])"/>.
/// </summary> /// </summary>
public class DefaultTypeActivatorCache : ITypeActivatorCache public class TypeActivatorCache : ITypeActivatorCache
{ {
private readonly Func<Type, ObjectFactory> _createFactory = private readonly Func<Type, ObjectFactory> _createFactory =
(type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes); (type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes);

View File

@ -1,28 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNet.Mvc.Logging
{
internal static class ChallengeResultLoggerExtenstions
{
private static readonly Action<ILogger, string[], Exception> _challengeResultExecuting;
static ChallengeResultLoggerExtenstions()
{
_challengeResultExecuting = LoggerMessage.Define<string[]>(
LogLevel.Information,
1,
"Executing ChallengeResult with authentication schemes ({Schemes}).");
}
public static void ChallengeResultExecuting(this ILogger logger, IList<string> schemes)
{
_challengeResultExecuting(logger, schemes.ToArray(), null);
}
}
}

View File

@ -1,27 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.Logging
{
internal static class ContentResultLoggerExtensions
{
private static readonly Action<ILogger, string, Exception> _contentResultExecuting;
static ContentResultLoggerExtensions()
{
_contentResultExecuting = LoggerMessage.Define<string>(
LogLevel.Information,
1,
"Executing ContentResult with HTTP Response ContentType of {ContentType}");
}
public static void ContentResultExecuting(this ILogger logger, string contentType)
{
_contentResultExecuting(logger, contentType, null);
}
}
}

View File

@ -4,9 +4,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Formatters.Internal;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.Logging namespace Microsoft.AspNet.Mvc.Logging
{ {

View File

@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {

View File

@ -11,6 +11,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
#endif #endif
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -9,6 +9,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
#endif #endif
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -3,6 +3,7 @@
using System; using System;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.Internal;
#if DOTNET5_4 #if DOTNET5_4
using System.Reflection; using System.Reflection;
#endif #endif

View File

@ -13,6 +13,7 @@ using System.Runtime.ExceptionServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ModelBinding.Validation;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Microsoft.AspNet.Mvc.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation namespace Microsoft.AspNet.Mvc.ModelBinding.Validation
{ {

View File

@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Mvc
/// <summary> /// <summary>
/// Gets a Dictionary of CacheProfile Names, <see cref="CacheProfile"/> which are pre-defined settings for /// Gets a Dictionary of CacheProfile Names, <see cref="CacheProfile"/> which are pre-defined settings for
/// <see cref="ResponseCacheFilter"/>. /// response caching.
/// </summary> /// </summary>
public IDictionary<string, CacheProfile> CacheProfiles { get; } public IDictionary<string, CacheProfile> CacheProfiles { get; }

View File

@ -4,7 +4,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc

View File

@ -8,6 +8,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Formatters;
using Microsoft.AspNet.Mvc.Formatters.Internal;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;

View File

@ -4,6 +4,7 @@
using System; using System;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -118,14 +119,13 @@ namespace Microsoft.AspNet.Mvc
// ResponseCacheFilter cannot take any null values. Hence, if there are any null values, // ResponseCacheFilter cannot take any null values. Hence, if there are any null values,
// the properties convert them to their defaults and are passed on. // the properties convert them to their defaults and are passed on.
return new ResponseCacheFilter( return new ResponseCacheFilter(new CacheProfile
new CacheProfile {
{ Duration = _duration,
Duration = _duration, Location = _location,
Location = _location, NoStore = _noStore,
NoStore = _noStore, VaryByHeader = VaryByHeader
VaryByHeader = VaryByHeader });
});
} }
} }
} }

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.Infrastructure;
namespace Microsoft.AspNet.Mvc.Routing namespace Microsoft.AspNet.Mvc.Routing
{ {

Some files were not shown because too many files have changed in this diff Show More