From 0a3ad09466ded9d928f9f2bf803c801d26b09b14 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 23 Oct 2014 13:18:38 -0700 Subject: [PATCH] Rename GlobalModel -> ApplicationModel This also comes with a rename of the namespace Microsoft.AspNet.Mvc.ApplicationModel to Microsoft.AspNet.Mvc.ApplicationModels. Also tuned up some parameter and variable names for increased understandability. --- .../AutoGenerateRouteNamesAttribute.cs | 2 +- .../ActionModel.cs | 2 +- .../ApplicationModel.cs} | 6 +++--- .../ApplicationModelConventions.cs | 12 ++++++------ .../AttributeRouteModel.cs | 2 +- .../ControllerModel.cs | 4 ++-- .../DefaultActionModelBuilder.cs | 2 +- .../DefaultControllerModelBuilder.cs | 2 +- .../IActionModelBuilder.cs | 2 +- .../IActionModelConvention.cs | 6 +++--- .../IApplicationModelConvention.cs} | 14 +++++++------- .../IControllerModelBuilder.cs | 2 +- .../IControllerModelConvention.cs | 8 ++++---- .../IParameterModelConvention.cs | 6 +++--- .../ParameterModel.cs | 2 +- .../ControllerActionDescriptorBuilder.cs | 12 ++++++------ .../ControllerActionDescriptorProvider.cs | 8 ++++---- src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs | 10 +++++++--- ...ActionConventionsApplicationModelConvention.cs} | 14 +++++++------- ...WebApiOverloadingApplicationModelConvention.cs} | 12 ++++++------ ...ameterConventionsApplicationModelConvention.cs} | 12 ++++++------ ...s => WebApiRoutesApplicationModelConvention.cs} | 14 +++++++------- .../WebApiCompatShimOptionsSetup.cs | 8 ++++---- src/Microsoft.AspNet.Mvc/MvcServices.cs | 2 +- .../ApplicationModel/ActionModelTest.cs | 2 +- .../ApplicationModel/AttributeRouteModelTests.cs | 2 +- .../ApplicationModel/ControllerModelTest.cs | 4 ++-- .../DefaultActionModelBuilderTest.cs | 2 +- .../DefaultControllerModelBuilderTest.cs | 6 +++--- .../ApplicationModel/ParameterModelTest.cs | 2 +- .../ControllerActionDescriptorProviderTests.cs | 6 +++--- .../DefaultActionSelectorTests.cs | 2 +- .../StaticControllerModelBuilder.cs | 2 +- .../ApiControllerActionDiscoveryTest.cs | 2 +- .../ApiExplorerVisibilityDisabledConvention.cs | 8 ++++---- .../ApiExplorerVisibilityEnabledConvention.cs | 8 ++++---- .../Controllers/ActionModelController.cs | 2 +- .../Controllers/ControllerModelController.cs | 2 +- .../Controllers/ParameterModelController.cs | 2 +- 39 files changed, 110 insertions(+), 106 deletions(-) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/ActionModel.cs (98%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel/GlobalModel.cs => ApplicationModels/ApplicationModel.cs} (80%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/ApplicationModelConventions.cs (87%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/AttributeRouteModel.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/ControllerModel.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/DefaultActionModelBuilder.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/DefaultControllerModelBuilder.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/IActionModelBuilder.cs (95%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/IActionModelConvention.cs (83%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel/IGlobalModelConvention.cs => ApplicationModels/IApplicationModelConvention.cs} (51%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/IControllerModelBuilder.cs (95%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/IControllerModelConvention.cs (75%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/IParameterModelConvention.cs (81%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModel => ApplicationModels}/ParameterModel.cs (96%) rename src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/{WebApiActionConventionsGlobalModelConvention.cs => WebApiActionConventionsApplicationModelConvention.cs} (86%) rename src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/{WebApiOverloadingGlobalModelConvention.cs => WebApiOverloadingApplicationModelConvention.cs} (67%) rename src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/{WebApiParameterConventionsGlobalModelConvention.cs => WebApiParameterConventionsApplicationModelConvention.cs} (80%) rename src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/{WebApiRoutesGlobalModelConvention.cs => WebApiRoutesApplicationModelConvention.cs} (61%) diff --git a/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs b/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs index 51775083e3..7a8505c4ce 100644 --- a/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs +++ b/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace MvcSample.Web { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ActionModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ActionModel.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs index 05155389ab..3d09bfd119 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ActionModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ActionModel { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/GlobalModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModel.cs similarity index 80% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/GlobalModel.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModel.cs index 69ff21f3b2..e102fbefca 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/GlobalModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { - public class GlobalModel + public class ApplicationModel { - public GlobalModel() + public ApplicationModel() { Controllers = new List(); Filters = new List(); diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ApplicationModelConventions.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs similarity index 87% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ApplicationModelConventions.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs index 7a2af4d017..038dc7e7e8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ApplicationModelConventions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs @@ -4,21 +4,21 @@ using System.Collections.Generic; using System.Linq; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// - /// Applies conventions to a . + /// Applies conventions to a . /// public static class ApplicationModelConventions { /// - /// Applies conventions to a . + /// Applies conventions to a . /// - /// The . + /// The . /// The set of conventions. public static void ApplyConventions( - [NotNull] GlobalModel applicationModel, - [NotNull] IEnumerable conventions) + [NotNull] ApplicationModel applicationModel, + [NotNull] IEnumerable conventions) { // Conventions are applied from the outside-in to allow for scenarios where an action overrides // a controller, etc. diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/AttributeRouteModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/AttributeRouteModel.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs index 7b941d0ef5..c0b08084f6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/AttributeRouteModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs @@ -7,7 +7,7 @@ using System.Text; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Routing; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class AttributeRouteModel { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ControllerModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ControllerModel.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs index 2c3d45b7cd..4aeb5aa493 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ControllerModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ControllerModel { @@ -47,7 +47,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel public List Actions { get; private set; } - public GlobalModel Application { get; set; } + public ApplicationModel Application { get; set; } public List Attributes { get; private set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultActionModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultActionModelBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs index d9309f2fc3..73bd9d54db 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultActionModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs @@ -8,7 +8,7 @@ using Microsoft.AspNet.Mvc.Description; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Routing; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultControllerModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultControllerModelBuilder.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultControllerModelBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultControllerModelBuilder.cs index 6bf5fbcd0c..24c478602a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/DefaultControllerModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultControllerModelBuilder.cs @@ -7,7 +7,7 @@ using System.Reflection; using Microsoft.AspNet.Mvc.Description; using Microsoft.AspNet.Mvc.Routing; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs index fe6eb58e4c..ad17c6fafc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Reflection; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// Creates a set of for a method. diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs similarity index 83% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelConvention.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs index 665918ce2e..f38fb21d89 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IActionModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// Allows customization of the of the . @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel /// /// Called to apply the convention to the . /// - /// The . - void Apply([NotNull] ActionModel model); + /// The . + void Apply([NotNull] ActionModel action); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IGlobalModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs similarity index 51% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IGlobalModelConvention.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs index 94ebc5fe44..75b716e4f8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IGlobalModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs @@ -1,24 +1,24 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// - /// Allows customization of the of the . + /// Allows customization of the of the . /// /// /// Implementaions of this interface can be registered in /// to customize metadata about the application. /// - /// run before other types of customizations to the + /// run before other types of customizations to the /// reflected model. /// - public interface IGlobalModelConvention + public interface IApplicationModelConvention { /// - /// Called to apply the convention to the . + /// Called to apply the convention to the . /// - /// The . - void Apply([NotNull] GlobalModel model); + /// The . + void Apply([NotNull] ApplicationModel application); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs index 49b85d895b..0184e829ca 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs @@ -3,7 +3,7 @@ using System.Reflection; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// Creates a set of for a type. diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs similarity index 75% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelConvention.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs index 35260d15b0..609795a6d1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IControllerModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// Allows customization of the of the . @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel /// place it on a controller class. /// /// customizations run after - /// customizations and before + /// customizations and before /// customizations. /// public interface IControllerModelConvention @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel /// /// Called to apply the convention to the . /// - /// The . - void Apply([NotNull] ControllerModel model); + /// The . + void Apply([NotNull] ControllerModel controller); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IParameterModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs similarity index 81% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IParameterModelConvention.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs index a17ec0537a..173946c1f0 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/IParameterModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// Allows customization of the of the . @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel /// /// Called to apply the convention to the . /// - /// The . - void Apply([NotNull] ParameterModel model); + /// The . + void Apply([NotNull] ParameterModel parameter); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ParameterModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ParameterModel.cs rename to src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs index d9c7a81f06..3860768292 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModel/ParameterModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Reflection; using Microsoft.AspNet.Mvc.ModelBinding; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ParameterModel { diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs index 0cf1088a8f..a78a7be7e3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Reflection; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Description; using Microsoft.AspNet.Mvc.Routing; @@ -14,7 +14,7 @@ using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc { /// - /// Creates instances of from . + /// Creates instances of from . /// public static class ControllerActionDescriptorBuilder { @@ -23,11 +23,11 @@ namespace Microsoft.AspNet.Mvc private const int DefaultAttributeRouteOrder = 0; /// - /// Creates instances of from . + /// Creates instances of from . /// - /// The . + /// The . /// The list of . - public static IList Build(GlobalModel application) + public static IList Build(ApplicationModel application) { var actions = new List(); @@ -176,7 +176,7 @@ namespace Microsoft.AspNet.Mvc } private static IList CreateActionDescriptors( - GlobalModel application, + ApplicationModel application, ControllerModel controller, ActionModel action) { diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs index 528f6f4bf2..5cfc27296d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.Filters; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Mvc @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc private readonly IControllerModelBuilder _applicationModelBuilder; private readonly IAssemblyProvider _assemblyProvider; private readonly IReadOnlyList _globalFilters; - private readonly IEnumerable _modelConventions; + private readonly IEnumerable _modelConventions; public ControllerActionDescriptorProvider(IAssemblyProvider assemblyProvider, IControllerModelBuilder applicationModelBuilder, @@ -47,9 +47,9 @@ namespace Microsoft.AspNet.Mvc return ControllerActionDescriptorBuilder.Build(applicationModel); } - public GlobalModel BuildModel() + public ApplicationModel BuildModel() { - var applicationModel = new GlobalModel(); + var applicationModel = new ApplicationModel(); applicationModel.Filters.AddRange(_globalFilters); var assemblies = _assemblyProvider.CandidateAssemblies; diff --git a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs index d2d6004bfb..d84ffc2f1c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.OptionDescriptors; @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc public MvcOptions() { - ApplicationModelConventions = new List(); + ApplicationModelConventions = new List(); ModelBinders = new List(); ViewEngines = new List(); ValueProviderFactories = new List(); @@ -121,6 +121,10 @@ namespace Microsoft.AspNet.Mvc /// public List ValueProviderFactories { get; private set; } - public List ApplicationModelConventions { get; private set; } + /// + /// Gets a list of instances that will be applied to + /// the when discovering actions. + /// + public List ApplicationModelConventions { get; private set; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsGlobalModelConvention.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs similarity index 86% rename from src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsGlobalModelConvention.cs rename to src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs index c52d92b6b7..159ab8f3b4 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsGlobalModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs @@ -4,11 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace Microsoft.AspNet.Mvc.WebApiCompatShim { - public class WebApiActionConventionsGlobalModelConvention : IGlobalModelConvention + public class WebApiActionConventionsApplicationModelConvention : IApplicationModelConvention { private static readonly string[] SupportedHttpMethodConventions = new string[] { @@ -21,9 +21,9 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim "OPTIONS", }; - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (IsConventionApplicable(controller)) { @@ -37,11 +37,11 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim return controller.Attributes.OfType().Any(); } - private void Apply(ControllerModel model) + private void Apply(ControllerModel controller) { var newActions = new List(); - foreach (var action in model.Actions) + foreach (var action in controller.Actions) { SetHttpMethodFromConvention(action); @@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim } } - model.Actions.AddRange(newActions); + controller.Actions.AddRange(newActions); } private bool IsActionAttributeRouted(ActionModel action) diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingGlobalModelConvention.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingApplicationModelConvention.cs similarity index 67% rename from src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingGlobalModelConvention.cs rename to src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingApplicationModelConvention.cs index 8158788989..6157100307 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingGlobalModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiOverloadingApplicationModelConvention.cs @@ -2,15 +2,15 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace Microsoft.AspNet.Mvc.WebApiCompatShim { - public class WebApiOverloadingGlobalModelConvention : IGlobalModelConvention + public class WebApiOverloadingApplicationModelConvention : IApplicationModelConvention { - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (IsConventionApplicable(controller)) { @@ -24,9 +24,9 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim return controller.Attributes.OfType().Any(); } - private void Apply(ControllerModel model) + private void Apply(ControllerModel controller) { - foreach (var action in model.Actions) + foreach (var action in controller.Actions) { action.ActionConstraints.Add(new OverloadActionConstraint()); } diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsGlobalModelConvention.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsApplicationModelConvention.cs similarity index 80% rename from src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsGlobalModelConvention.cs rename to src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsApplicationModelConvention.cs index cb610f5e8f..dc4456ced5 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsGlobalModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiParameterConventionsApplicationModelConvention.cs @@ -3,16 +3,16 @@ using System.Linq; using System.Web.Http; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.WebApiCompatShim { - public class WebApiParameterConventionsGlobalModelConvention : IGlobalModelConvention + public class WebApiParameterConventionsApplicationModelConvention : IApplicationModelConvention { - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (IsConventionApplicable(controller)) { @@ -26,9 +26,9 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim return controller.Attributes.OfType().Any(); } - private void Apply(ControllerModel model) + private void Apply(ControllerModel controller) { - foreach (var action in model.Actions) + foreach (var action in controller.Actions) { foreach (var parameter in action.Parameters) { diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesGlobalModelConvention.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesApplicationModelConvention.cs similarity index 61% rename from src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesGlobalModelConvention.cs rename to src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesApplicationModelConvention.cs index e9dff1f49f..a01d91b9c3 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesGlobalModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Conventions/WebApiRoutesApplicationModelConvention.cs @@ -2,22 +2,22 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace Microsoft.AspNet.Mvc.WebApiCompatShim { - public class WebApiRoutesGlobalModelConvention : IGlobalModelConvention + public class WebApiRoutesApplicationModelConvention : IApplicationModelConvention { private readonly string _area; - public WebApiRoutesGlobalModelConvention(string area) + public WebApiRoutesApplicationModelConvention(string area) { _area = area; } - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (IsConventionApplicable(controller)) { @@ -31,9 +31,9 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim return controller.Attributes.OfType().Any(); } - private void Apply(ControllerModel model) + private void Apply(ControllerModel controller) { - model.RouteConstraints.Add(new AreaAttribute(_area)); + controller.RouteConstraints.Add(new AreaAttribute(_area)); } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/WebApiCompatShimOptionsSetup.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/WebApiCompatShimOptionsSetup.cs index 739a52310e..c9c26e7cc2 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/WebApiCompatShimOptionsSetup.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/WebApiCompatShimOptionsSetup.cs @@ -21,10 +21,10 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim public void Configure(MvcOptions options, string name = "") { // Add webapi behaviors to controllers with the appropriate attributes - options.ApplicationModelConventions.Add(new WebApiActionConventionsGlobalModelConvention()); - options.ApplicationModelConventions.Add(new WebApiParameterConventionsGlobalModelConvention()); - options.ApplicationModelConventions.Add(new WebApiOverloadingGlobalModelConvention()); - options.ApplicationModelConventions.Add(new WebApiRoutesGlobalModelConvention(area: DefaultAreaName)); + options.ApplicationModelConventions.Add(new WebApiActionConventionsApplicationModelConvention()); + options.ApplicationModelConventions.Add(new WebApiParameterConventionsApplicationModelConvention()); + options.ApplicationModelConventions.Add(new WebApiOverloadingApplicationModelConvention()); + options.ApplicationModelConventions.Add(new WebApiRoutesApplicationModelConvention(area: DefaultAreaName)); // Add an action filter for handling the HttpResponseException. options.Filters.Add(new HttpResponseExceptionActionFilter()); diff --git a/src/Microsoft.AspNet.Mvc/MvcServices.cs b/src/Microsoft.AspNet.Mvc/MvcServices.cs index f0c3d0af31..c9e2e0b174 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServices.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServices.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Description; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Internal; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs index 6ee8171405..2dcf250264 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Reflection; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ActionModelTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs index b6647d7775..c691b6d36c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class AttributeRouteModelTests { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs index 0f94d27794..ee7288a0a8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Reflection; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ControllerModelTest { @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel controller.ActionConstraints.Add(new HttpMethodConstraint(new string[] { "GET" })); controller.ApiExplorerGroupName = "group"; controller.ApiExplorerIsVisible = true; - controller.Application = new GlobalModel(); + controller.Application = new ApplicationModel(); controller.Attributes.Add(new HttpGetAttribute()); controller.ControllerName = "cool"; controller.Filters.Add(new AuthorizeAttribute()); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs index 19248753f7..ef963044b6 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Reflection; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class DefaultActionModelBuilderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultControllerModelBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultControllerModelBuilderTest.cs index 6843a0aff6..23fd344f36 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultControllerModelBuilderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultControllerModelBuilderTest.cs @@ -2,10 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using Microsoft.AspNet.Mvc.ApplicationModel.DefaultControllerModelBuilderTestControllers; +using Microsoft.AspNet.Mvc.ApplicationModels.DefaultControllerModelBuilderTestControllers; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class DefaultControllerModelBuilderTest { @@ -183,7 +183,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModel // implementation of this class to test it, they are just top level classes. Don't reuse // these outside this test - find a better way or use nested classes to keep the tests // independent. -namespace Microsoft.AspNet.Mvc.ApplicationModel.DefaultControllerModelBuilderTestControllers +namespace Microsoft.AspNet.Mvc.ApplicationModels.DefaultControllerModelBuilderTestControllers { public abstract class AbstractController : Mvc.Controller { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs index 05e496ab74..9311fb5371 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Mvc.ModelBinding; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ParameterModelTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs index 9b1079dc1e..2d28f6a940 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.Description; using Microsoft.AspNet.Mvc.Routing; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.Framework.OptionsModel; using Moq; using Xunit; @@ -1114,9 +1114,9 @@ namespace Microsoft.AspNet.Mvc.Test // Arrange var sequence = 0; - var applicationConvention = new Mock(); + var applicationConvention = new Mock(); applicationConvention - .Setup(c => c.Apply(It.IsAny())) + .Setup(c => c.Apply(It.IsAny())) .Callback(() => { Assert.Equal(0, sequence++); }); var controllerConvention = new Mock(); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs index a045a20674..d315a3bceb 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading.Tasks; using System.Reflection; using Microsoft.AspNet.Http; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.PipelineCore; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/StaticControllerModelBuilder.cs b/test/Microsoft.AspNet.Mvc.Core.Test/StaticControllerModelBuilder.cs index 6b3deca884..7b8af20b09 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/StaticControllerModelBuilder.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/StaticControllerModelBuilder.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -namespace Microsoft.AspNet.Mvc.ApplicationModel +namespace Microsoft.AspNet.Mvc.ApplicationModels { /// /// An implementation of StaticControllerModelBuilder that only allows controllers diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs index ad0eaa3951..44d5a4587b 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.WebApiCompatShim; using Microsoft.Framework.DependencyInjection; diff --git a/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityDisabledConvention.cs b/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityDisabledConvention.cs index 5c5d9a3a18..37f03975a7 100644 --- a/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityDisabledConvention.cs +++ b/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityDisabledConvention.cs @@ -3,14 +3,14 @@ using System; using System.Reflection; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace ApiExplorer { // Disables ApiExplorer for a specific controller type. // This is part of the test that validates that ApiExplorer can be configured via // convention - public class ApiExplorerVisibilityDisabledConvention : IGlobalModelConvention + public class ApiExplorerVisibilityDisabledConvention : IApplicationModelConvention { private readonly TypeInfo _type; @@ -19,9 +19,9 @@ namespace ApiExplorer _type = type.GetTypeInfo(); } - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (controller.ControllerType == _type) { diff --git a/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityEnabledConvention.cs b/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityEnabledConvention.cs index aefd4734fc..52064a9b80 100644 --- a/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityEnabledConvention.cs +++ b/test/WebSites/ApiExplorerWebSite/ApiExplorerVisibilityEnabledConvention.cs @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace ApiExplorer { // Enables ApiExplorer for controllers that haven't explicitly configured it. // This is part of the test that validates that ApiExplorer can be configured via // convention - public class ApiExplorerVisibilityEnabledConvention : IGlobalModelConvention + public class ApiExplorerVisibilityEnabledConvention : IApplicationModelConvention { - public void Apply(GlobalModel model) + public void Apply(ApplicationModel application) { - foreach (var controller in model.Controllers) + foreach (var controller in application.Controllers) { if (controller.ApiExplorerIsVisible == null) { diff --git a/test/WebSites/ApplicationModelWebSite/Controllers/ActionModelController.cs b/test/WebSites/ApplicationModelWebSite/Controllers/ActionModelController.cs index 46e667db62..ace8ed9d4c 100644 --- a/test/WebSites/ApplicationModelWebSite/Controllers/ActionModelController.cs +++ b/test/WebSites/ApplicationModelWebSite/Controllers/ActionModelController.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace ApplicationModelWebSite { diff --git a/test/WebSites/ApplicationModelWebSite/Controllers/ControllerModelController.cs b/test/WebSites/ApplicationModelWebSite/Controllers/ControllerModelController.cs index 57aef9b9b2..e8a0bae3a9 100644 --- a/test/WebSites/ApplicationModelWebSite/Controllers/ControllerModelController.cs +++ b/test/WebSites/ApplicationModelWebSite/Controllers/ControllerModelController.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace ApplicationModelWebSite { diff --git a/test/WebSites/ApplicationModelWebSite/Controllers/ParameterModelController.cs b/test/WebSites/ApplicationModelWebSite/Controllers/ParameterModelController.cs index c4a36ea012..27a23e1ea1 100644 --- a/test/WebSites/ApplicationModelWebSite/Controllers/ParameterModelController.cs +++ b/test/WebSites/ApplicationModelWebSite/Controllers/ParameterModelController.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.ApplicationModel; +using Microsoft.AspNet.Mvc.ApplicationModels; namespace ApplicationModelWebSite {