From dd952d8d70bab70f8fe336811b20d793931b80e1 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 21 Jan 2016 10:28:59 -0800 Subject: [PATCH] Move some types to .Internal namespace --- .../CountrySpecificAttribute.cs | 2 +- .../CustomRouteSample.Web/LocaleAttribute.cs | 2 +- .../MvcSubAreaSample.Web/SubAreaAttribute.cs | 2 +- .../DefaultApiDescriptionProvider.cs | 3 +- .../AcceptVerbsAttribute.cs | 2 +- .../ApplicationModels/ActionModel.cs | 1 + .../ApplicationModels/AttributeRouteModel.cs | 2 +- .../ApplicationModels/ControllerModel.cs | 2 +- .../AreaAttribute.cs | 2 +- .../ChallengeResult.cs | 2 +- .../ConsumesAttribute.cs | 1 + .../Controllers/DefaultControllerActivator.cs | 2 +- ...Binder.cs => IControllerArgumentBinder.cs} | 0 .../MvcCoreServiceCollectionExtensions.cs | 8 +- ...cRouteHandlerDiagnosticSourceExtensions.cs | 41 ------ .../Formatters/FormatFilter.cs | 1 + .../Formatters/MediaType.cs | 1 + .../Infrastructure/IActionSelector.cs | 2 +- .../AcceptHeaderParser.cs | 2 +- .../ActionDescriptorCollectionProvider.cs} | 9 +- .../ActionInvokerFactory.cs | 3 +- .../ActionSelectionDecisionTree.cs | 3 +- .../ActionSelector.cs} | 11 +- .../ActionSelectorDecisionTreeProvider.cs | 2 +- .../AllowAnonymousFilter.cs | 5 +- .../AmbiguousActionException.cs | 2 +- .../ApiDescriptionActionData.cs | 2 +- .../ApplicationModelConventions.cs | 3 +- .../{Routing => Internal}/AttributeRoute.cs | 3 +- .../{Routing => Internal}/AttributeRouting.cs | 3 +- .../AuthorizationApplicationModelProvider.cs | 3 +- .../{Filters => Internal}/AuthorizeFilter.cs | 3 +- .../ControllerActionDescriptorBuilder.cs | 8 +- .../ControllerActionDescriptorProvider.cs | 3 +- .../ControllerActionExecutor.cs | 2 +- .../ControllerActionFilter.cs | 3 +- .../ControllerActionInvoker.cs | 4 +- .../ControllerActionInvokerProvider.cs | 4 +- .../ControllerArgumentBinder.cs} | 10 +- .../ControllerResultFilter.cs | 3 +- .../DefaultActionConstraintProvider.cs | 3 +- .../DefaultApplicationModelProvider.cs | 4 +- .../DefaultBindingMetadataProvider.cs | 4 +- .../DefaultCollectionValidationStrategy.cs | 5 +- .../DefaultComplexObjectValidationStrategy.cs | 4 +- ...DefaultCompositeMetadataDetailsProvider.cs | 3 +- .../DefaultControllerPropertyActivator.cs | 4 +- .../DefaultFilterProvider.cs | 3 +- .../DefaultModelValidatorProvider.cs | 6 +- .../DefaultObjectValidator.cs | 4 +- .../DefaultValidationMetadataProvider.cs | 3 +- .../ElementalValueProvider.cs | 3 +- ...plicitIndexCollectionValidationStrategy.cs | 4 +- .../FilterActionInvoker.cs | 4 +- .../FilterDescriptorOrderComparer.cs | 3 +- .../FilterItemOrderComparer.cs | 3 +- .../HttpMethodActionConstraint.cs} | 8 +- .../HttpParseResult.cs | 4 +- .../HttpTokenParsingRules.cs | 6 +- .../IActionInvokerFactory.cs | 2 +- .../IActionSelectorDecisionTreeProvider.cs | 2 +- .../IConsumesActionConstraint.cs | 4 +- .../{Formatters => Internal}/IFormatFilter.cs | 2 +- .../IHttpRequestStreamReaderFactory.cs | 2 +- .../IHttpResponseStreamWriterFactory.cs | 2 +- .../IResponseCacheFilter.cs | 4 +- .../ITypeActivatorCache.cs | 2 +- .../MediaTypeSegmentWithQuality.cs | 2 +- ...emoryPoolHttpRequestStreamReaderFactory.cs | 3 +- ...moryPoolHttpResponseStreamWriterFactory.cs | 2 +- .../MvcCoreDiagnosticSourceExtensions.cs} | 34 ++++- .../MvcCoreLoggerExtensions.cs} | 31 ++++- .../MvcRouteHandler.cs | 5 +- .../ObjectResultExecutor.cs | 4 +- .../PrefixContainer.cs | 2 +- .../ReferenceEqualityComparer.cs | 2 +- .../ResponseCacheFilter.cs | 5 +- .../RouteConstraintAttribute.cs | 4 +- .../ShortFormDictionaryValidationStrategy.cs | 4 +- .../TypeActivatorCache.cs} | 4 +- .../ChallengeResultLoggerExtensions.cs | 28 ---- .../Logging/ContentResultLoggerExtensions.cs | 27 ---- .../ObjectResultExecutorLoggerExtensions.cs | 3 +- .../ModelBinding/BodyModelBinder.cs | 2 +- .../ModelBinding/CollectionModelBinder.cs | 1 + .../ModelBinding/DictionaryModelBinder.cs | 1 + .../EmptyModelMetadataProvider.cs | 1 + .../ModelBinding/FormValueProvider.cs | 1 + .../ModelBinding/JQueryFormValueProvider.cs | 1 + .../Metadata/DefaultModelMetadata.cs | 1 + .../ModelBinding/ModelBindingHelper.cs | 1 + .../ModelBinding/QueryStringValueProvider.cs | 1 + .../ModelBinding/RouteValueProvider.cs | 1 + .../Validation/ValidationVisitor.cs | 1 + src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs | 2 +- src/Microsoft.AspNet.Mvc.Core/ObjectResult.cs | 2 +- .../ProducesAttribute.cs | 1 + .../ResponseCacheAttribute.cs | 16 +-- .../RouteAttribute.cs | 2 +- .../Routing/HttpMethodAttribute.cs | 1 - .../IActionHttpMethodProvider.cs | 2 +- .../Routing/IActionSelectionDecisionTree.cs | 2 +- .../IRouteConstraintProvider.cs | 4 +- .../IRouteTemplateProvider.cs | 2 +- .../MvcCorsMvcCoreBuilderExtensions.cs | 2 +- .../CorsApplicationModelProvider.cs | 2 +- .../{ => Internal}/CorsAuthorizationFilter.cs | 2 +- .../CorsAuthorizationFilterFactory.cs | 2 +- .../DisableCorsAuthorizationFilter.cs | 2 +- .../Internal}/ICorsAuthorizationFilter.cs | 4 +- .../MvcDataAnnotationsMvcBuilderExtensions.cs | 2 +- .../IAttributeAdapter.cs | 4 +- .../{ => Internal}/AttributeAdapterBase.cs | 4 +- .../{ => Internal}/CompareAttributeAdapter.cs | 4 +- ...AnnotationsClientModelValidatorProvider.cs | 4 +- .../DataAnnotationsLocalizationServices.cs | 1 - .../DataAnnotationsMetadataProvider.cs | 4 +- .../DataAnnotationsModelValidator.cs | 4 +- .../DataAnnotationsModelValidatorProvider.cs | 4 +- .../DataTypeAttributeAdapter.cs | 4 +- .../DefaultClientModelValidatorProvider.cs | 5 +- .../MaxLengthAttributeAdapter.cs | 4 +- .../MinLengthAttributeAdapter.cs | 4 +- .../ModelClientValidationEqualToRule.cs | 3 +- .../ModelClientValidationMaxLengthRule.cs | 4 +- .../ModelClientValidationMinLengthRule.cs | 4 +- .../ModelClientValidationNumericRule.cs | 4 +- .../ModelClientValidationRangeRule.cs | 3 +- .../ModelClientValidationRegexRule.cs | 4 +- .../ModelClientValidationRequiredRule.cs | 4 +- .../ModelClientValidationStringLengthRule.cs | 4 +- ...DataAnnotationsLocalizationOptionsSetup.cs | 1 - .../MvcDataAnnotationsMvcOptionsSetup.cs | 2 - .../NumericClientModelValidator.cs | 5 +- .../NumericClientModelValidatorProvider.cs | 3 +- .../{ => Internal}/RangeAttributeAdapter.cs | 4 +- .../RegularExpressionAttributeAdapter.cs | 4 +- .../RequiredAttributeAdapter.cs | 4 +- .../StringLengthAttributeAdapter.cs | 4 +- .../ValidatableObjectAdapter.cs | 4 +- .../ValidationAttributeAdapterOfTAttribute.cs | 4 +- .../ValidationAttributeAdapterProvider.cs | 4 +- .../MvcDataAnnotationsLocalizationOptions.cs | 2 +- src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs | 1 + .../Internal/MvcViewOptionsSetup.cs | 2 +- .../DefaultViewComponentInvoker.cs | 1 + .../DefaultViewComponentInvokerFactory.cs | 2 +- .../ViewFeatures/PartialViewResultExecutor.cs | 2 +- .../ViewFeatures/ViewResultExecutor.cs | 2 +- .../ModelBinding/ModelStateDictionaryTest.cs | 1 + .../DefaultApiDescriptionProviderTest.cs | 5 +- .../ApplicationModel/ActionModelTest.cs | 6 +- .../ApplicationModel/ControllerModelTest.cs | 3 +- .../ConsumesAttributeTests.cs | 1 + .../ControllerBaseTest.cs | 3 + .../DefaultControllerActivatorTest.cs | 6 +- .../DefaultControllerFactoryTest.cs | 13 +- .../Controllers/TestController.cs | 120 ------------------ .../CreatedAtActionResultTests.cs | 1 + .../CreatedAtRouteResultTests.cs | 1 + .../CreatedResultTests.cs | 1 + .../Formatters/InputFormatterTest.cs | 1 + .../Formatters/MediaTypeComparisonsTest.cs | 14 -- .../HttpNotFoundObjectResultTest.cs | 1 + .../HttpOkObjectResultTest.cs | 1 + .../DefaultActionSelectorTests.cs | 11 +- .../ObjectResultExecutorTest.cs | 3 +- .../AcceptHeaderParserTest.cs | 2 +- .../AttributeRouteTest.cs | 3 +- .../AttributeRoutingTest.cs | 3 +- ...thorizationApplicationModelProviderTest.cs | 3 +- .../AuthorizeFilterTest.cs | 9 +- .../ControllerActionDescriptorBuilderTest.cs | 3 +- ...ControllerActionDescriptorProviderTests.cs | 22 ++-- .../ControllerActionExecutorTests.cs} | 116 ++++++++++++++++- .../ControllerActionInvokerTest.cs | 8 +- .../ControllerArgumentBinderTests.cs} | 9 +- .../DefaultApplicationModelProviderTest.cs | 4 +- .../DefaultBindingMetadataProviderTest.cs | 4 +- ...DefaultCollectionValidationStrategyTest.cs | 4 +- ...aultComplexObjectValidationStrategyTest.cs | 4 +- .../DefaultModelValidatorProviderTest.cs | 5 +- .../DefaultObjectValidatorTests.cs | 4 +- .../ElementalValueProviderTests.cs | 3 +- ...itIndexCollectionValidationStrategyTest.cs | 4 +- .../Internal/FilterCacheTest.cs | 2 +- .../FilterProviderTest.cs} | 3 +- .../HttpMethodActionConstraintTest.cs} | 14 +- .../ReferenceEqualityComparerTest.cs | 2 +- .../ResponseCacheFilterTest.cs | 3 +- ...ortFormDictionaryValidationStrategyTest.cs | 4 +- .../ModelBinding/CollectionModelBinderTest.cs | 4 +- .../ModelBinding/CompositeModelBinderTest.cs | 1 + .../ModelBinding/DictionaryModelBinderTest.cs | 1 + .../KeyValuePairModelBinderTest.cs | 1 + .../Metadata/DefaultModelMetadataTest.cs | 1 + ... DefaultValidationMetadataProviderTest.cs} | 3 +- .../EmptyCompositeMetadataDetailsProvider.cs | 2 + .../ModelBinding/ModelBindingHelperTest.cs | 3 + .../ModelBinding/SimpleValueProvider.cs | 1 + .../ObjectResultTests.cs | 1 + .../ProducesAttributeTests.cs | 1 + .../ResponseCacheAttributeTest.cs | 1 + .../Routing/KnownRouteValueConstraintTests.cs | 3 +- .../RouteTemplateProviderAttributesTest.cs | 1 - .../CorsApplicationModelProviderTest.cs | 3 +- .../CorsAuthorizationFilterTest.cs | 2 +- .../CompareAttributeAdapterTest.cs | 4 +- ...tationsClientModelValidatorProviderTest.cs | 8 +- .../DataAnnotationsMetadataProviderTest.cs | 4 +- ...taAnnotationsModelValidatorProviderTest.cs | 5 +- .../DataAnnotationsModelValidatorTest.cs | 5 +- ...mberRequiredBindingMetadataProviderTest.cs | 4 +- ...ataTypeClientModelValidatorProviderTest.cs | 4 +- ...DefaultModelClientValidatorProviderTest.cs | 4 +- .../MaxLengthAttributeAdapterTest.cs | 4 +- .../MinLengthAttributeAdapterTest.cs | 4 +- .../ModelMetadataProviderTest.cs | 5 +- .../NumericClientModelValidatorTest.cs | 4 +- .../RangeAttributeAdapterTest.cs | 1 + .../RequiredAttributeAdapterTest.cs | 4 +- .../StringLengthAttributeAdapterTest.cs | 4 +- .../{ => Internal}/TestModelNameProvider.cs | 5 +- .../{ => Internal}/TestResources.cs | 0 ...idationAttributeAdapterOfTAttributeTest.cs | 9 +- .../ValidationAttributeAdapterProviderTest.cs | 4 +- .../JsonInputFormatterTest.cs | 1 + .../JsonPatchInputFormatterTest.cs | 1 + ...ataContractSerializerInputFormatterTest.cs | 1 + .../XmlSerializerInputFormatterTest.cs | 1 + .../DefaultOrderTest.cs | 1 + .../RouteDataTest.cs | 1 + .../ModelBindingTestHelper.cs | 7 +- .../RazorPageActivatorTest.cs | 1 + .../RazorPageCreateTagHelperTest.cs | 3 +- .../MvcOptionsSetupTest.cs | 1 + .../MvcServiceCollectionExtensionsTest.cs | 1 + .../TestClientModelValidatorProvider.cs | 1 + .../TestHttpRequestStreamReaderFactory.cs | 1 + .../TestHttpResponseStreamWriterFactory.cs | 2 +- .../TestModelMetadataProvider.cs | 2 + .../TestModelValidatorProvider.cs | 2 + .../ControllerTest.cs | 3 + .../Rendering/DefaultTemplatesUtilities.cs | 1 + .../ViewComponentResultTest.cs | 3 +- .../ApiControllerActionDiscoveryTest.cs | 17 +-- .../BadRequestErrorMessageResultTest.cs | 1 + .../ExceptionResultTest.cs | 1 + .../InvalidModelStateResultTest.cs | 1 + .../NegotiatedContentResultTest.cs | 1 + .../TestHttpResponseStreamWriterFactory.cs | 1 + .../RoutingWebSite/HttpMergeAttribute.cs | 2 +- .../VersionDeleteAttribute.cs | 2 +- .../VersioningWebSite/VersionGetAttribute.cs | 2 +- .../VersioningWebSite/VersionPostAttribute.cs | 2 +- .../VersioningWebSite/VersionPutAttribute.cs | 2 +- 256 files changed, 670 insertions(+), 551 deletions(-) rename src/Microsoft.AspNet.Mvc.Core/Controllers/{IControllerActionArgumentBinder.cs => IControllerArgumentBinder.cs} (100%) delete mode 100644 src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/MvcRouteHandlerDiagnosticSourceExtensions.cs rename src/Microsoft.AspNet.Mvc.Core/{Formatters => Internal}/AcceptHeaderParser.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure/DefaultActionDescriptorCollectionProvider.cs => Internal/ActionDescriptorCollectionProvider.cs} (85%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/ActionInvokerFactory.cs (93%) rename src/Microsoft.AspNet.Mvc.Core/{Routing => Internal}/ActionSelectionDecisionTree.cs (98%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure/DefaultActionSelector.cs => Internal/ActionSelector.cs} (97%) rename src/Microsoft.AspNet.Mvc.Core/{Routing => Internal}/ActionSelectorDecisionTreeProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/AllowAnonymousFilter.cs (82%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/AmbiguousActionException.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{ApiExplorer => Internal}/ApiDescriptionActionData.cs (93%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModels => Internal}/ApplicationModelConventions.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Routing => Internal}/AttributeRoute.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{Routing => Internal}/AttributeRouting.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModels => Internal}/AuthorizationApplicationModelProvider.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/AuthorizeFilter.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/ControllerActionDescriptorBuilder.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/ControllerActionDescriptorProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/ControllerActionExecutor.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/ControllerActionFilter.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/ControllerActionInvoker.cs (98%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/ControllerActionInvokerProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers/DefaultControllerActionArgumentBinder.cs => Internal/ControllerArgumentBinder.cs} (97%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/ControllerResultFilter.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{ActionConstraints => Internal}/DefaultActionConstraintProvider.cs (95%) rename src/Microsoft.AspNet.Mvc.Core/{ApplicationModels => Internal}/DefaultApplicationModelProvider.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Metadata => Internal}/DefaultBindingMetadataProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/DefaultCollectionValidationStrategy.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/DefaultComplexObjectValidationStrategy.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Metadata => Internal}/DefaultCompositeMetadataDetailsProvider.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/DefaultControllerPropertyActivator.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/DefaultFilterProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/DefaultModelValidatorProvider.cs (84%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/DefaultObjectValidator.cs (93%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Metadata => Internal}/DefaultValidationMetadataProvider.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding => Internal}/ElementalValueProvider.cs (92%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/ExplicitIndexCollectionValidationStrategy.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Controllers => Internal}/FilterActionInvoker.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/FilterDescriptorOrderComparer.cs (93%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/FilterItemOrderComparer.cs (92%) rename src/Microsoft.AspNet.Mvc.Core/{ActionConstraints/HttpMethodConstraint.cs => Internal/HttpMethodActionConstraint.cs} (92%) rename src/Microsoft.AspNet.Mvc.Core/{Formatters => Internal}/HttpParseResult.cs (74%) rename src/Microsoft.AspNet.Mvc.Core/{Formatters => Internal}/HttpTokenParsingRules.cs (98%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/IActionInvokerFactory.cs (87%) rename src/Microsoft.AspNet.Mvc.Core/{Routing => Internal}/IActionSelectorDecisionTreeProvider.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{ActionConstraints => Internal}/IConsumesActionConstraint.cs (83%) rename src/Microsoft.AspNet.Mvc.Core/{Formatters => Internal}/IFormatFilter.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/IHttpRequestStreamReaderFactory.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/IHttpResponseStreamWriterFactory.cs (94%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/IResponseCacheFilter.cs (82%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/ITypeActivatorCache.cs (95%) rename src/Microsoft.AspNet.Mvc.Core/{Formatters => Internal}/MediaTypeSegmentWithQuality.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/MemoryPoolHttpRequestStreamReaderFactory.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/MemoryPoolHttpResponseStreamWriterFactory.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{DiagnosticSource/FilterActionInvokerDiagnosticSourceExtensions.cs => Internal/MvcCoreDiagnosticSourceExtensions.cs} (94%) rename src/Microsoft.AspNet.Mvc.Core/{Logging/MvcRouteHandlerLoggerExtensions.cs => Internal/MvcCoreLoggerExtensions.cs} (73%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/MvcRouteHandler.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/ObjectResultExecutor.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding => Internal}/PrefixContainer.cs (99%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/ReferenceEqualityComparer.cs (95%) rename src/Microsoft.AspNet.Mvc.Core/{Filters => Internal}/ResponseCacheFilter.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Internal}/RouteConstraintAttribute.cs (96%) rename src/Microsoft.AspNet.Mvc.Core/{ModelBinding/Validation => Internal}/ShortFormDictionaryValidationStrategy.cs (97%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure/DefaultTypeActivatorCache.cs => Internal/TypeActivatorCache.cs} (92%) delete mode 100644 src/Microsoft.AspNet.Mvc.Core/Logging/ChallengeResultLoggerExtensions.cs delete mode 100644 src/Microsoft.AspNet.Mvc.Core/Logging/ContentResultLoggerExtensions.cs rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Routing}/IActionHttpMethodProvider.cs (86%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Routing}/IRouteConstraintProvider.cs (92%) rename src/Microsoft.AspNet.Mvc.Core/{Infrastructure => Routing}/IRouteTemplateProvider.cs (96%) rename src/Microsoft.AspNet.Mvc.Cors/{ => Internal}/CorsApplicationModelProvider.cs (98%) rename src/Microsoft.AspNet.Mvc.Cors/{ => Internal}/CorsAuthorizationFilter.cs (98%) rename src/Microsoft.AspNet.Mvc.Cors/{ => Internal}/CorsAuthorizationFilterFactory.cs (97%) rename src/Microsoft.AspNet.Mvc.Cors/{ => Internal}/DisableCorsAuthorizationFilter.cs (97%) rename src/{Microsoft.AspNet.Mvc.Core/Filters => Microsoft.AspNet.Mvc.Cors/Internal}/ICorsAuthorizationFilter.cs (82%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/AttributeAdapterBase.cs (92%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/CompareAttributeAdapter.cs (97%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DataAnnotationsClientModelValidatorProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DataAnnotationsMetadataProvider.cs (98%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DataAnnotationsModelValidator.cs (98%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DataAnnotationsModelValidatorProvider.cs (97%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DataTypeAttributeAdapter.cs (94%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/DefaultClientModelValidatorProvider.cs (88%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/MaxLengthAttributeAdapter.cs (93%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/MinLengthAttributeAdapter.cs (93%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationEqualToRule.cs (89%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationMaxLengthRule.cs (85%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationMinLengthRule.cs (85%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationNumericRule.cs (88%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationRangeRule.cs (90%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationRegexRule.cs (84%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationRequiredRule.cs (81%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ModelClientValidationStringLengthRule.cs (89%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/NumericClientModelValidator.cs (89%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/NumericClientModelValidatorProvider.cs (91%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/RangeAttributeAdapter.cs (93%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/RegularExpressionAttributeAdapter.cs (93%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/RequiredAttributeAdapter.cs (92%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/StringLengthAttributeAdapter.cs (94%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ValidatableObjectAdapter.cs (95%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ValidationAttributeAdapterOfTAttribute.cs (94%) rename src/Microsoft.AspNet.Mvc.DataAnnotations/{ => Internal}/ValidationAttributeAdapterProvider.cs (96%) delete mode 100644 test/Microsoft.AspNet.Mvc.Core.Test/Controllers/TestController.cs delete mode 100644 test/Microsoft.AspNet.Mvc.Core.Test/Formatters/MediaTypeComparisonsTest.cs rename test/Microsoft.AspNet.Mvc.Core.Test/{Formatters => Internal}/AcceptHeaderParserTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Routing => Internal}/AttributeRouteTest.cs (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Routing => Internal}/AttributeRoutingTest.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ApplicationModel => Internal}/AuthorizationApplicationModelProviderTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Filters => Internal}/AuthorizeFilterTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Controllers => Internal}/ControllerActionDescriptorBuilderTest.cs (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Controllers => Internal}/ControllerActionDescriptorProviderTests.cs (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Controllers/ActionExecutorTests.cs => Internal/ControllerActionExecutorTests.cs} (82%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Controllers => Internal}/ControllerActionInvokerTest.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Controllers/ControllerActionArgumentBinderTests.cs => Internal/ControllerArgumentBinderTests.cs} (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ApplicationModel => Internal}/DefaultApplicationModelProviderTest.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Metadata => Internal}/DefaultBindingMetadataProviderTest.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/DefaultCollectionValidationStrategyTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/DefaultComplexObjectValidationStrategyTest.cs (94%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/DefaultModelValidatorProviderTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/DefaultObjectValidatorTests.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding => Internal}/ElementalValueProviderTests.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/ExplicitIndexCollectionValidationStrategyTest.cs (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Filters/DefaultFilterProviderTest.cs => Internal/FilterProviderTest.cs} (98%) rename test/Microsoft.AspNet.Mvc.Core.Test/{HttpMethodConstraintTest.cs => Internal/HttpMethodActionConstraintTest.cs} (84%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/ReferenceEqualityComparerTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/{Filters => Internal}/ResponseCacheFilterTest.cs (99%) rename test/Microsoft.AspNet.Mvc.Core.Test/{ModelBinding/Validation => Internal}/ShortFormDictionaryValidationStrategyTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/{DefaultValidationMetadataTest.cs => DefaultValidationMetadataProviderTest.cs} (97%) rename test/Microsoft.AspNet.Mvc.Cors.Test/{ => Internal}/CorsApplicationModelProviderTest.cs (97%) rename test/Microsoft.AspNet.Mvc.Cors.Test/{ => Internal}/CorsAuthorizationFilterTest.cs (99%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/CompareAttributeAdapterTest.cs (97%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataAnnotationsClientModelValidatorProviderTest.cs (96%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataAnnotationsMetadataProviderTest.cs (99%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataAnnotationsModelValidatorProviderTest.cs (97%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataAnnotationsModelValidatorTest.cs (99%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataMemberRequiredBindingMetadataProviderTest.cs (97%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DataTypeClientModelValidatorProviderTest.cs (93%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/DefaultModelClientValidatorProviderTest.cs (98%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/MaxLengthAttributeAdapterTest.cs (97%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/MinLengthAttributeAdapterTest.cs (96%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/ModelMetadataProviderTest.cs (99%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/NumericClientModelValidatorTest.cs (90%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/RangeAttributeAdapterTest.cs (98%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/RequiredAttributeAdapterTest.cs (95%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/StringLengthAttributeAdapterTest.cs (96%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/TestModelNameProvider.cs (74%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/TestResources.cs (100%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/ValidationAttributeAdapterOfTAttributeTest.cs (90%) rename test/Microsoft.AspNet.Mvc.DataAnnotations.Test/{ => Internal}/ValidationAttributeAdapterProviderTest.cs (95%) diff --git a/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs b/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs index 17cfc5ed7a..5b7784fdf7 100644 --- a/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs +++ b/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Mvc.ActionConstraints; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace ActionConstraintSample.Web { diff --git a/samples/CustomRouteSample.Web/LocaleAttribute.cs b/samples/CustomRouteSample.Web/LocaleAttribute.cs index f065299660..ae483e95ee 100644 --- a/samples/CustomRouteSample.Web/LocaleAttribute.cs +++ b/samples/CustomRouteSample.Web/LocaleAttribute.cs @@ -1,7 +1,7 @@ // 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 Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace CustomRouteSample.Web { diff --git a/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs b/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs index bc17d7dd90..5ca3e694db 100644 --- a/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs +++ b/samples/MvcSubAreaSample.Web/SubAreaAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace MvcSubAreaSample.Web { diff --git a/src/Microsoft.AspNet.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs b/src/Microsoft.AspNet.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs index 90d937be27..8d3581f6ce 100644 --- a/src/Microsoft.AspNet.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Template; @@ -263,7 +264,7 @@ namespace Microsoft.AspNet.Mvc.ApiExplorer { if (action.ActionConstraints != null && action.ActionConstraints.Count > 0) { - return action.ActionConstraints.OfType().SelectMany(c => c.HttpMethods); + return action.ActionConstraints.OfType().SelectMany(c => c.HttpMethods); } else { diff --git a/src/Microsoft.AspNet.Mvc.Core/AcceptVerbsAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/AcceptVerbsAttribute.cs index bf7aa1c96b..d695f63ecb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AcceptVerbsAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AcceptVerbsAttribute.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs index 7e5c08fb7f..efcfe68127 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs @@ -9,6 +9,7 @@ using System.Reflection; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc.ApplicationModels { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs index 6bcdcdcb8d..85edd77286 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.AspNet.Mvc.Core; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc.ApplicationModels { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs index 376f131a31..b148b0c2cb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Filters; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc.ApplicationModels { diff --git a/src/Microsoft.AspNet.Mvc.Core/AreaAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/AreaAttribute.cs index 3482a89424..9b19b61f7a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AreaAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AreaAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc { diff --git a/src/Microsoft.AspNet.Mvc.Core/ChallengeResult.cs b/src/Microsoft.AspNet.Mvc.Core/ChallengeResult.cs index 4a357eadc9..e5edd11137 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ChallengeResult.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ChallengeResult.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNet.Http.Authentication; -using Microsoft.AspNet.Mvc.Logging; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNet.Mvc.Core/ConsumesAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/ConsumesAttribute.cs index 1319e6451e..1b691fb8b4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ConsumesAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ConsumesAttribute.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNet.Mvc diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActivator.cs b/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActivator.cs index 2499f21977..2674fc7c81 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActivator.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActivator.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.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.Controllers { diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/IControllerActionArgumentBinder.cs b/src/Microsoft.AspNet.Mvc.Core/Controllers/IControllerArgumentBinder.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/IControllerActionArgumentBinder.cs rename to src/Microsoft.AspNet.Mvc.Core/Controllers/IControllerArgumentBinder.cs diff --git a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs index 3cab7e2336..85a2295958 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs @@ -92,12 +92,12 @@ namespace Microsoft.Extensions.DependencyInjection ServiceDescriptor.Transient()); services.TryAddEnumerable( ServiceDescriptor.Transient()); - services.TryAddSingleton(); + services.TryAddSingleton(); // // Action Selection // - services.TryAddSingleton(); + services.TryAddSingleton(); // Performs caching services.TryAddSingleton(); @@ -126,7 +126,7 @@ namespace Microsoft.Extensions.DependencyInjection ServiceDescriptor.Transient()); // These are stateless - services.TryAddSingleton(); + services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddEnumerable( ServiceDescriptor.Singleton()); @@ -147,7 +147,7 @@ namespace Microsoft.Extensions.DependencyInjection // Random Infrastructure // services.TryAddSingleton(); - services.TryAddSingleton(); + services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); diff --git a/src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/MvcRouteHandlerDiagnosticSourceExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/MvcRouteHandlerDiagnosticSourceExtensions.cs deleted file mode 100644 index 0528a61740..0000000000 --- a/src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/MvcRouteHandlerDiagnosticSourceExtensions.cs +++ /dev/null @@ -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 }); - } - } - } -} diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormatFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormatFilter.cs index 199aa55fc1..0cd72578b3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormatFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormatFilter.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.Filters; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.Extensions.Options; namespace Microsoft.AspNet.Mvc.Formatters diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaType.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaType.cs index 3bf928958d..3d58698760 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaType.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaType.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; using System.Text; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Primitives; diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionSelector.cs b/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionSelector.cs index 80679c79be..b64f884fbc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionSelector.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure /// /// The for the current request. /// An or null if no action can be selected. - /// + /// /// Thrown when action selection results in an ambiguity. /// ActionDescriptor Select(RouteContext context); diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/AcceptHeaderParser.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AcceptHeaderParser.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Formatters/AcceptHeaderParser.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AcceptHeaderParser.cs index bda6fc6988..4d4de464bd 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/AcceptHeaderParser.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AcceptHeaderParser.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using Microsoft.AspNet.Mvc.Core; -namespace Microsoft.AspNet.Mvc.Formatters +namespace Microsoft.AspNet.Mvc.Formatters.Internal { public static class AcceptHeaderParser { diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionDescriptorCollectionProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionDescriptorCollectionProvider.cs similarity index 85% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionDescriptorCollectionProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ActionDescriptorCollectionProvider.cs index 92d3a5e638..c788279184 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionDescriptorCollectionProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionDescriptorCollectionProvider.cs @@ -5,24 +5,25 @@ using System; using System.Collections.ObjectModel; using System.Linq; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Default implementation of . /// This implementation caches the results at first call, and is not responsible for updates. /// - public class DefaultActionDescriptorCollectionProvider : IActionDescriptorCollectionProvider + public class ActionDescriptorCollectionProvider : IActionDescriptorCollectionProvider { private readonly IServiceProvider _serviceProvider; private ActionDescriptorCollection _collection; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The application IServiceProvider. - public DefaultActionDescriptorCollectionProvider(IServiceProvider serviceProvider) + public ActionDescriptorCollectionProvider(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ActionInvokerFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionInvokerFactory.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/ActionInvokerFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ActionInvokerFactory.cs index 0ee207d550..9e903704e1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ActionInvokerFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionInvokerFactory.cs @@ -4,8 +4,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Infrastructure; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { public class ActionInvokerFactory : IActionInvokerFactory { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectionDecisionTree.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectionDecisionTree.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectionDecisionTree.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectionDecisionTree.cs index cd3723f14d..d7a6d2dca8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectionDecisionTree.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectionDecisionTree.cs @@ -8,10 +8,11 @@ using System.ComponentModel; #endif using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.DecisionTree; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { /// public class ActionSelectionDecisionTree : IActionSelectionDecisionTree diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionSelector.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelector.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionSelector.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelector.cs index ae692697e0..5ed74b345e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultActionSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelector.cs @@ -8,36 +8,37 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// A default implementation. /// - public class DefaultActionSelector : IActionSelector + public class ActionSelector : IActionSelector { private readonly IActionSelectorDecisionTreeProvider _decisionTreeProvider; private readonly IActionConstraintProvider[] _actionConstraintProviders; private ILogger _logger; /// - /// Creates a new . + /// Creates a new . /// /// The . /// The set of instances. /// The . - public DefaultActionSelector( + public ActionSelector( IActionSelectorDecisionTreeProvider decisionTreeProvider, IEnumerable actionConstraintProviders, ILoggerFactory loggerFactory) { _decisionTreeProvider = decisionTreeProvider; _actionConstraintProviders = actionConstraintProviders.OrderBy(item => item.Order).ToArray(); - _logger = loggerFactory.CreateLogger(); + _logger = loggerFactory.CreateLogger(); } /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTreeProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectorDecisionTreeProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTreeProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectorDecisionTreeProvider.cs index ff70f7c9a7..240e993342 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTreeProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ActionSelectorDecisionTreeProvider.cs @@ -5,7 +5,7 @@ using System; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Infrastructure; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { /// public class ActionSelectorDecisionTreeProvider : IActionSelectorDecisionTreeProvider diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AllowAnonymousFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AllowAnonymousFilter.cs similarity index 82% rename from src/Microsoft.AspNet.Mvc.Core/Filters/AllowAnonymousFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AllowAnonymousFilter.cs index 88d965ff55..ab48ea81bb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/AllowAnonymousFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AllowAnonymousFilter.cs @@ -1,13 +1,14 @@ // 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. -namespace Microsoft.AspNet.Mvc.Filters +using Microsoft.AspNet.Mvc.Filters; + +namespace Microsoft.AspNet.Mvc.Internal { /// /// An implementation of /// public class AllowAnonymousFilter : IAllowAnonymousFilter { - } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/AmbiguousActionException.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AmbiguousActionException.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/AmbiguousActionException.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AmbiguousActionException.cs index a5f618f73b..46d949e523 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/AmbiguousActionException.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AmbiguousActionException.cs @@ -6,7 +6,7 @@ using System; using System.Runtime.Serialization; #endif -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// An exception which indicates multiple matches in action selection. diff --git a/src/Microsoft.AspNet.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ApiDescriptionActionData.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ApiDescriptionActionData.cs index 7faeb0ec01..71a928d7a5 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ApiDescriptionActionData.cs @@ -1,7 +1,7 @@ // 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. -namespace Microsoft.AspNet.Mvc.ApiExplorer +namespace Microsoft.AspNet.Mvc.Internal { /// /// Represents data used to build an ApiDescription, stored as part of the diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ApplicationModelConventions.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ApplicationModelConventions.cs index 0a337067bf..0a9312c3e7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ApplicationModelConventions.cs @@ -4,8 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ApplicationModels; -namespace Microsoft.AspNet.Mvc.ApplicationModels +namespace Microsoft.AspNet.Mvc.Internal { /// /// Applies conventions to a . diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRoute.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRoute.cs index 491162422d..8db4d71f4d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRoute.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Internal; using Microsoft.AspNet.Routing.Template; @@ -16,7 +17,7 @@ using Microsoft.AspNet.Routing.Tree; using Microsoft.Extensions.Logging; using Microsoft.Extensions.ObjectPool; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { public class AttributeRoute : IRouter { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRouting.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRouting.cs index dfa20786c1..b102174e9c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AttributeRouting.cs @@ -4,13 +4,14 @@ using System; using System.Text.Encodings.Web; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.ObjectPool; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { public static class AttributeRouting { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs index d1cb520204..87f1c9915e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs @@ -4,10 +4,11 @@ using System; using System.Linq; using Microsoft.AspNet.Authorization; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.ApplicationModels +namespace Microsoft.AspNet.Mvc.Internal { public class AuthorizationApplicationModelProvider : IApplicationModelProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizeFilter.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizeFilter.cs index b0675d4a8b..1361fc0157 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/AuthorizeFilter.cs @@ -6,10 +6,11 @@ using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNet.Authorization; +using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { /// /// An implementation of diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs index 49852f9a5b..21137c37b4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs @@ -9,15 +9,15 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; -using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.ApplicationModels; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing.Tree; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { /// /// Creates instances of from . @@ -424,7 +424,7 @@ namespace Microsoft.AspNet.Mvc.Controllers var httpMethods = action.HttpMethods; if (httpMethods != null && httpMethods.Count > 0) { - constraints.Add(new HttpMethodConstraint(httpMethods)); + constraints.Add(new HttpMethodActionConstraint(httpMethods)); } if (action.ActionConstraints != null) @@ -716,7 +716,7 @@ namespace Microsoft.AspNet.Mvc.Controllers { var routeTemplate = action.AttributeRouteInfo?.Template ?? nullTemplate; - var verbs = action.ActionConstraints.OfType().FirstOrDefault()?.HttpMethods; + var verbs = action.ActionConstraints.OfType().FirstOrDefault()?.HttpMethods; var formattedVerbs = string.Join(", ", verbs.OrderBy(v => v, StringComparer.Ordinal)); var description = diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs index 6614e76b0e..047cf9af34 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionDescriptorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs @@ -6,9 +6,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ApplicationModels; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionDescriptorProvider : IActionDescriptorProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionExecutor.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionExecutor.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionExecutor.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionExecutor.cs index 25465b1fbf..62d3f41045 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionExecutor.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Core; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public static class ControllerActionExecutor { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ControllerActionFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionFilter.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Filters/ControllerActionFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionFilter.cs index 140923606a..2ae0f7d4ee 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ControllerActionFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionFilter.cs @@ -4,8 +4,9 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { /// /// A filter implementation which delegates to the controller for action filter interfaces. diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvoker.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvoker.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvoker.cs index cab7bfed93..376923f0bb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvoker.cs @@ -6,17 +6,17 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionInvoker : FilterActionInvoker { diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvokerProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvokerProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvokerProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvokerProvider.cs index a24bcb3e9e..9084650d33 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/ControllerActionInvokerProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerActionInvokerProvider.cs @@ -6,14 +6,14 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionInvokerProvider : IActionInvokerProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActionArgumentBinder.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerArgumentBinder.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActionArgumentBinder.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerArgumentBinder.cs index 662d4a4df3..7e6adbfe4e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerActionArgumentBinder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerArgumentBinder.cs @@ -3,31 +3,31 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { /// /// Provides a default implementation of . /// Uses ModelBinding to populate action parameters. /// - public class DefaultControllerActionArgumentBinder : IControllerActionArgumentBinder + public class ControllerArgumentBinder : IControllerActionArgumentBinder { private static readonly MethodInfo CallPropertyAddRangeOpenGenericMethod = - typeof(DefaultControllerActionArgumentBinder).GetTypeInfo().GetDeclaredMethod( + typeof(ControllerArgumentBinder).GetTypeInfo().GetDeclaredMethod( nameof(CallPropertyAddRange)); private readonly IModelMetadataProvider _modelMetadataProvider; private readonly IObjectModelValidator _validator; - public DefaultControllerActionArgumentBinder( + public ControllerArgumentBinder( IModelMetadataProvider modelMetadataProvider, IObjectModelValidator validator) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ControllerResultFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerResultFilter.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Filters/ControllerResultFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ControllerResultFilter.cs index e5c91200db..256b3dda2b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ControllerResultFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ControllerResultFilter.cs @@ -4,8 +4,9 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { /// /// A filter implementation which delegates to the controller for result filter interfaces. diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultActionConstraintProvider.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultActionConstraintProvider.cs index daff453263..12dec79de2 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultActionConstraintProvider.cs @@ -2,8 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ActionConstraints; -namespace Microsoft.AspNet.Mvc.ActionConstraints +namespace Microsoft.AspNet.Mvc.Internal { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultApplicationModelProvider.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultApplicationModelProvider.cs index 990945af63..70f07011c1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultApplicationModelProvider.cs @@ -7,13 +7,15 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ApiExplorer; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.ApplicationModels +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultApplicationModelProvider : IApplicationModelProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs index 36f5a328d5..a5723762e0 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs @@ -5,8 +5,10 @@ using System; using System.Collections.Generic; using System.Linq; 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 { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs index d3a332ef48..e9d121ba48 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs @@ -1,12 +1,13 @@ // 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; using System.Collections.Generic; 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 { /// /// The default implementation of for a collection. diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs index 6afc3ccdb5..f86532f2ab 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs @@ -5,8 +5,10 @@ using System; using System.Collections; using System.Collections.Generic; 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 { /// /// The default implementation of for a complex object. diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs index c8b153b1fd..df3d7a1ad8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs @@ -4,8 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.Internal { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs index 10643342d4..5e29cb84b1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs @@ -5,10 +5,10 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultControllerPropertyActivator : IControllerPropertyActivator { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultFilterProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultFilterProvider.cs index 75f523045e..8301d3f0da 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultFilterProvider.cs @@ -4,8 +4,9 @@ using System; using System.Diagnostics; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultFilterProvider : IFilterProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultModelValidatorProvider.cs similarity index 84% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultModelValidatorProvider.cs index 939851a961..2f2da71e9a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultModelValidatorProvider.cs @@ -1,14 +1,16 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.Internal { /// /// A default . /// /// /// The provides validators from - /// instances in . + /// instances in . /// public class DefaultModelValidatorProvider : IModelValidatorProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultObjectValidator.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultObjectValidator.cs index 2c802f3bb8..a16eef1011 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultObjectValidator.cs @@ -2,8 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { /// /// The default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs index d158a5ccb8..c9c27be51d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs @@ -2,9 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.Internal { /// /// A default implementation of . diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ElementalValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ElementalValueProvider.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/ElementalValueProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ElementalValueProvider.cs index 80cb112734..c6f65d820b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ElementalValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ElementalValueProvider.cs @@ -3,8 +3,9 @@ using System; using System.Globalization; +using Microsoft.AspNet.Mvc.ModelBinding; -namespace Microsoft.AspNet.Mvc.ModelBinding +namespace Microsoft.AspNet.Mvc.Internal { public class ElementalValueProvider : IValueProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs index 220a75a71a..ea75f5c7da 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs @@ -4,8 +4,10 @@ using System; using System.Collections; 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 { /// /// An implementation of for a collection bound using 'explict indexing' diff --git a/src/Microsoft.AspNet.Mvc.Core/Controllers/FilterActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterActionInvoker.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Controllers/FilterActionInvoker.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/FilterActionInvoker.cs index cc62b9e1ec..a88285f3ae 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Controllers/FilterActionInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterActionInvoker.cs @@ -8,16 +8,14 @@ using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Core; -using Microsoft.AspNet.Mvc.Diagnostics; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public abstract class FilterActionInvoker : IActionInvoker { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs index 135c07942e..f5e4a21595 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs @@ -3,8 +3,9 @@ using System; using System.Collections.Generic; +using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class FilterDescriptorOrderComparer : IComparer { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterItemOrderComparer.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/FilterItemOrderComparer.cs index 2d861e6252..a98a6c5f9e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/FilterItemOrderComparer.cs @@ -3,8 +3,9 @@ using System; using System.Collections.Generic; +using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class FilterItemOrderComparer : IComparer { diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/HttpMethodConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpMethodActionConstraint.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/HttpMethodConstraint.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/HttpMethodActionConstraint.cs index bb7b400471..7682d30d10 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/HttpMethodConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpMethodActionConstraint.cs @@ -4,12 +4,12 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using Microsoft.AspNet.Mvc.ActionConstraints; 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; @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc.ActionConstraints private readonly string PreflightHttpMethod = "OPTIONS"; // Empty collection means any method will be accepted. - public HttpMethodConstraint(IEnumerable httpMethods) + public HttpMethodActionConstraint(IEnumerable httpMethods) { if (httpMethods == null) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpParseResult.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpParseResult.cs similarity index 74% rename from src/Microsoft.AspNet.Mvc.Core/Formatters/HttpParseResult.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/HttpParseResult.cs index 86a4fec97c..b40895c0d5 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpParseResult.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpParseResult.cs @@ -1,9 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.Formatters +namespace Microsoft.AspNet.Mvc.Formatters.Internal { - internal enum HttpParseResult + public enum HttpParseResult { Parsed, NotParsed, diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpTokenParsingRules.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpTokenParsingRules.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Core/Formatters/HttpTokenParsingRules.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/HttpTokenParsingRules.cs index 10f9ec0844..4aeb153d9f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpTokenParsingRules.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/HttpTokenParsingRules.cs @@ -1,14 +1,12 @@ // 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.Diagnostics.Contracts; -using System.Globalization; 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 const int MaxNestedCount = 5; diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionInvokerFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IActionInvokerFactory.cs similarity index 87% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionInvokerFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IActionInvokerFactory.cs index 2549fda72c..24a5d93831 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionInvokerFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IActionInvokerFactory.cs @@ -3,7 +3,7 @@ using Microsoft.AspNet.Mvc.Abstractions; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { public interface IActionInvokerFactory { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IActionSelectorDecisionTreeProvider.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IActionSelectorDecisionTreeProvider.cs index 0b67057199..532999dbf7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IActionSelectorDecisionTreeProvider.cs @@ -1,7 +1,7 @@ // 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. -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { /// /// Stores an for the current value of diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IConsumesActionConstraint.cs similarity index 83% rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IConsumesActionConstraint.cs index cc02ecb153..14f0547ad3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IConsumesActionConstraint.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ActionConstraints +using Microsoft.AspNet.Mvc.ActionConstraints; + +namespace Microsoft.AspNet.Mvc.Internal { /// /// An constraint that identifies a type which can be used to select an action diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IFormatFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IFormatFilter.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/Formatters/IFormatFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IFormatFilter.cs index 301b7ea77b..f9bc689d6b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IFormatFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IFormatFilter.cs @@ -3,7 +3,7 @@ using Microsoft.AspNet.Mvc.Filters; -namespace Microsoft.AspNet.Mvc.Formatters +namespace Microsoft.AspNet.Mvc.Formatters.Internal { /// /// A filter which produces a desired content type for the current request. diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpRequestStreamReaderFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IHttpRequestStreamReaderFactory.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpRequestStreamReaderFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IHttpRequestStreamReaderFactory.cs index c9f82988a8..bf36c7eb43 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpRequestStreamReaderFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IHttpRequestStreamReaderFactory.cs @@ -4,7 +4,7 @@ using System.IO; using System.Text; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Creates instances for reading from . diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpResponseStreamWriterFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IHttpResponseStreamWriterFactory.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpResponseStreamWriterFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IHttpResponseStreamWriterFactory.cs index 1ec51d2cfb..f0244d4b98 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IHttpResponseStreamWriterFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IHttpResponseStreamWriterFactory.cs @@ -4,7 +4,7 @@ using System.IO; using System.Text; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Creates instances for writing to . diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IResponseCacheFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/IResponseCacheFilter.cs similarity index 82% rename from src/Microsoft.AspNet.Mvc.Core/Filters/IResponseCacheFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/IResponseCacheFilter.cs index 47b1991598..fc0877cd71 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/IResponseCacheFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/IResponseCacheFilter.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.Filters +using Microsoft.AspNet.Mvc.Filters; + +namespace Microsoft.AspNet.Mvc.Internal { /// /// An which sets the appropriate headers related to Response caching. diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ITypeActivatorCache.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ITypeActivatorCache.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/ITypeActivatorCache.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ITypeActivatorCache.cs index 9c3b95272a..118125620f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ITypeActivatorCache.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ITypeActivatorCache.cs @@ -3,7 +3,7 @@ using System; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Caches instances produced by diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs index 16f06fd876..949e721f46 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNet.Mvc.Formatters +namespace Microsoft.AspNet.Mvc.Formatters.Internal { /// /// A media type with its associated quality. diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs index 55c245a46e..7797c7a3b1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs @@ -5,8 +5,9 @@ using System; using System.Buffers; using System.IO; using System.Text; +using Microsoft.AspNet.Mvc.Infrastructure; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// An that uses pooled buffers. diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs index 959c0bdcc7..02a281ac47 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs @@ -6,7 +6,7 @@ using System.Buffers; using System.IO; using System.Text; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// An that uses pooled buffers. diff --git a/src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/FilterActionInvokerDiagnosticSourceExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/FilterActionInvokerDiagnosticSourceExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs index fe1228f856..f2ee7575ee 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DiagnosticSource/FilterActionInvokerDiagnosticSourceExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs @@ -3,13 +3,43 @@ using System.Collections.Generic; using System.Diagnostics; +using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Abstractions; 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( this DiagnosticSource diagnosticSource, AuthorizationContext authorizationContext, diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs similarity index 73% rename from src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs index 0a1be7625d..504638a330 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs @@ -4,19 +4,24 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using Microsoft.AspNet.Mvc.Abstractions; 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 Action _actionExecuting; private static readonly Action _actionExecuted; - static MvcRouteHandlerLoggerExtensions() + private static readonly Action _challengeResultExecuting; + + private static readonly Action _contentResultExecuting; + + static MvcCoreLoggerExtensions() { _actionExecuting = LoggerMessage.Define( LogLevel.Debug, @@ -27,6 +32,16 @@ namespace Microsoft.AspNet.Mvc.Logging LogLevel.Information, 2, "Executed action {ActionName} in {ElapsedMilliseconds}ms"); + + _challengeResultExecuting = LoggerMessage.Define( + LogLevel.Information, + 1, + "Executing ChallengeResult with authentication schemes ({Schemes})."); + + _contentResultExecuting = LoggerMessage.Define( + LogLevel.Information, + 1, + "Executing ContentResult with HTTP Response ContentType of {ContentType}"); } 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"); } + public static void ChallengeResultExecuting(this ILogger logger, IList schemes) + { + _challengeResultExecuting(logger, schemes.ToArray(), null); + } + + public static void ContentResultExecuting(this ILogger logger, string contentType) + { + _contentResultExecuting(logger, contentType, null); + } + private class ActionLogScope : ILogValues { private readonly ActionDescriptor _action; diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MvcRouteHandler.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcRouteHandler.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/MvcRouteHandler.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/MvcRouteHandler.cs index 3839c1866d..cfdc2f6d1c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/MvcRouteHandler.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcRouteHandler.cs @@ -7,15 +7,14 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Core; -using Microsoft.AspNet.Mvc.Diagnostics; -using Microsoft.AspNet.Mvc.Internal; +using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Tree; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { public class MvcRouteHandler : IRouter { diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ObjectResultExecutor.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ObjectResultExecutor.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/ObjectResultExecutor.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ObjectResultExecutor.cs index c07a263ccb..64627ece18 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/ObjectResultExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ObjectResultExecutor.cs @@ -9,14 +9,14 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Internal; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.AspNet.Mvc.Logging; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Executes an to write to the response. diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/PrefixContainer.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/PrefixContainer.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/PrefixContainer.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/PrefixContainer.cs index 6e226d1255..682b7b2d91 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/PrefixContainer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/PrefixContainer.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace Microsoft.AspNet.Mvc.ModelBinding +namespace Microsoft.AspNet.Mvc.Internal { /// /// This is a container for prefix values. It normalizes all the values into dotted-form and then stores diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ReferenceEqualityComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ReferenceEqualityComparer.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ReferenceEqualityComparer.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ReferenceEqualityComparer.cs index ea6c2e2224..1ee659bd89 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ReferenceEqualityComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ReferenceEqualityComparer.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { internal class ReferenceEqualityComparer : IEqualityComparer { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResponseCacheFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ResponseCacheFilter.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResponseCacheFilter.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ResponseCacheFilter.cs index 8c809db505..761a4c3566 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ResponseCacheFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ResponseCacheFilter.cs @@ -6,12 +6,13 @@ using System.Globalization; using System.Linq; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Filters; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { /// - /// An which sets the appropriate headers related to response caching. + /// An which sets the appropriate headers related to response caching. /// public class ResponseCacheFilter : IActionFilter, IResponseCacheFilter { diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/RouteConstraintAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/RouteConstraintAttribute.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/RouteConstraintAttribute.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/RouteConstraintAttribute.cs index d2d48d84d2..c132304631 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/RouteConstraintAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/RouteConstraintAttribute.cs @@ -2,10 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Mvc.Core; -using Microsoft.AspNet.Mvc.Routing; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Routing { /// /// An attribute which specifies a required route value for an action or controller. diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs index 673fbe235d..cf094b666e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs @@ -4,8 +4,10 @@ using System; using System.Collections; 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 { /// /// An implementation of for a dictionary bound with 'short form' style keys. diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultTypeActivatorCache.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeActivatorCache.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultTypeActivatorCache.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/TypeActivatorCache.cs index bd2a1407de..8a2ca2b58d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/DefaultTypeActivatorCache.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeActivatorCache.cs @@ -5,13 +5,13 @@ using System; using System.Collections.Concurrent; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { /// /// Caches instances produced by /// . /// - public class DefaultTypeActivatorCache : ITypeActivatorCache + public class TypeActivatorCache : ITypeActivatorCache { private readonly Func _createFactory = (type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes); diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ChallengeResultLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ChallengeResultLoggerExtensions.cs deleted file mode 100644 index e1f2cba77a..0000000000 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ChallengeResultLoggerExtensions.cs +++ /dev/null @@ -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 _challengeResultExecuting; - - static ChallengeResultLoggerExtenstions() - { - _challengeResultExecuting = LoggerMessage.Define( - LogLevel.Information, - 1, - "Executing ChallengeResult with authentication schemes ({Schemes})."); - } - - public static void ChallengeResultExecuting(this ILogger logger, IList schemes) - { - _challengeResultExecuting(logger, schemes.ToArray(), null); - } - } -} diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ContentResultLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ContentResultLoggerExtensions.cs deleted file mode 100644 index 759d456225..0000000000 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ContentResultLoggerExtensions.cs +++ /dev/null @@ -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 _contentResultExecuting; - - static ContentResultLoggerExtensions() - { - _contentResultExecuting = LoggerMessage.Define( - LogLevel.Information, - 1, - "Executing ContentResult with HTTP Response ContentType of {ContentType}"); - } - - public static void ContentResultExecuting(this ILogger logger, string contentType) - { - _contentResultExecuting(logger, contentType, null); - } - } -} diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ObjectResultExecutorLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ObjectResultExecutorLoggerExtensions.cs index 8b1677efb8..ca5829d7ad 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ObjectResultExecutorLoggerExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ObjectResultExecutorLoggerExtensions.cs @@ -4,9 +4,8 @@ using System; using System.Collections.Generic; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Primitives; -using Microsoft.Net.Http.Headers; namespace Microsoft.AspNet.Mvc.Logging { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/BodyModelBinder.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/BodyModelBinder.cs index 234e6ca1c9..05e4caca8a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/BodyModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/BodyModelBinder.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/CollectionModelBinder.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/CollectionModelBinder.cs index 855f460f36..073f3b8829 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/CollectionModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/CollectionModelBinder.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Reflection; #endif using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/DictionaryModelBinder.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/DictionaryModelBinder.cs index ab45bf7229..f4f5121ee7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/DictionaryModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/DictionaryModelBinder.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Reflection; #endif using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs index ea8635d795..8b5906c36b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs @@ -3,6 +3,7 @@ using System; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Metadata; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/FormValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/FormValueProvider.cs index c2b13ecf82..9fe9f9b4e3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/FormValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/FormValueProvider.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using Microsoft.AspNet.Http; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/JQueryFormValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/JQueryFormValueProvider.cs index b1ca4db1c4..9f1f2fbb58 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/JQueryFormValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/JQueryFormValueProvider.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.Primitives; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultModelMetadata.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultModelMetadata.cs index 48943e456e..5029f68c98 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Metadata/DefaultModelMetadata.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; +using Microsoft.AspNet.Mvc.Internal; #if DOTNET5_4 using System.Reflection; #endif diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ModelBindingHelper.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ModelBindingHelper.cs index 8764339924..38fd4ee879 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ModelBindingHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/ModelBindingHelper.cs @@ -13,6 +13,7 @@ using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/QueryStringValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/QueryStringValueProvider.cs index 4004985573..07f1646bf5 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/QueryStringValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/QueryStringValueProvider.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using Microsoft.AspNet.Http; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding { diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/RouteValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/RouteValueProvider.cs index 65b3bbf9e1..cd15df6d7d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/RouteValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/RouteValueProvider.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; namespace Microsoft.AspNet.Mvc.ModelBinding diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs index 391c546306..a38f4d9eeb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding.Validation { diff --git a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs index 512478ca00..7f07a10a13 100644 --- a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Mvc /// /// Gets a Dictionary of CacheProfile Names, which are pre-defined settings for - /// . + /// response caching. /// public IDictionary CacheProfiles { get; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ObjectResult.cs b/src/Microsoft.AspNet.Mvc.Core/ObjectResult.cs index 30d488548b..2957b7a5ce 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ObjectResult.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ObjectResult.cs @@ -4,7 +4,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Formatters; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNet.Mvc diff --git a/src/Microsoft.AspNet.Mvc.Core/ProducesAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/ProducesAttribute.cs index 6210b5b247..6865dc39e9 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ProducesAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ProducesAttribute.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNet.Mvc.Core/ResponseCacheAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/ResponseCacheAttribute.cs index 559275c9bc..e8aa125ddc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ResponseCacheAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ResponseCacheAttribute.cs @@ -4,6 +4,7 @@ using System; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Filters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; 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, // the properties convert them to their defaults and are passed on. - return new ResponseCacheFilter( - new CacheProfile - { - Duration = _duration, - Location = _location, - NoStore = _noStore, - VaryByHeader = VaryByHeader - }); + return new ResponseCacheFilter(new CacheProfile + { + Duration = _duration, + Location = _location, + NoStore = _noStore, + VaryByHeader = VaryByHeader + }); } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs index 06ac635f35..45fd7ba87d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/HttpMethodAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/HttpMethodAttribute.cs index c5ea198c39..fff9d1c2b6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/HttpMethodAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/HttpMethodAttribute.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Mvc.Infrastructure; namespace Microsoft.AspNet.Mvc.Routing { diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionHttpMethodProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionHttpMethodProvider.cs similarity index 86% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionHttpMethodProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Routing/IActionHttpMethodProvider.cs index 5d48eca8a0..ee2362e9a3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IActionHttpMethodProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionHttpMethodProvider.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Routing { public interface IActionHttpMethodProvider { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectionDecisionTree.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectionDecisionTree.cs index eab340ffd7..09ebfa997e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectionDecisionTree.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectionDecisionTree.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Mvc.Abstractions; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { /// /// A data structure that retrieves a list of matches based on the values diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteConstraintProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/IRouteConstraintProvider.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteConstraintProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Routing/IRouteConstraintProvider.cs index 776e0ca353..4659a7eedb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteConstraintProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/IRouteConstraintProvider.cs @@ -1,9 +1,7 @@ // 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 Microsoft.AspNet.Mvc.Routing; - -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Routing { /// /// An interface for metadata which provides values diff --git a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteTemplateProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/IRouteTemplateProvider.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteTemplateProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Routing/IRouteTemplateProvider.cs index 26207ffb8b..6df1cfcdfa 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Infrastructure/IRouteTemplateProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/IRouteTemplateProvider.cs @@ -1,7 +1,7 @@ // 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. -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Routing { /// /// Interface for attributes which can supply a route template for attribute routing. diff --git a/src/Microsoft.AspNet.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNet.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs index 27c549a418..8b545a8ec7 100644 --- a/src/Microsoft.AspNet.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.AspNet.Cors.Infrastructure; using Microsoft.AspNet.Mvc.ApplicationModels; -using Microsoft.AspNet.Mvc.Cors; +using Microsoft.AspNet.Mvc.Cors.Internal; using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection diff --git a/src/Microsoft.AspNet.Mvc.Cors/CorsApplicationModelProvider.cs b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsApplicationModelProvider.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Cors/CorsApplicationModelProvider.cs rename to src/Microsoft.AspNet.Mvc.Cors/Internal/CorsApplicationModelProvider.cs index fcc01bf89b..19c11f7ae6 100644 --- a/src/Microsoft.AspNet.Mvc.Cors/CorsApplicationModelProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsApplicationModelProvider.cs @@ -6,7 +6,7 @@ using System.Linq; using Microsoft.AspNet.Cors.Infrastructure; using Microsoft.AspNet.Mvc.ApplicationModels; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { public class CorsApplicationModelProvider : IApplicationModelProvider { diff --git a/src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilter.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilter.cs rename to src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilter.cs index 4eff4f2d18..35e7310110 100644 --- a/src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilter.cs @@ -10,7 +10,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { /// /// A filter which applies the given and adds appropriate response headers. diff --git a/src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilterFactory.cs b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilterFactory.cs rename to src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs index ba4f291687..168f1748e3 100644 --- a/src/Microsoft.AspNet.Mvc.Cors/CorsAuthorizationFilterFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs @@ -5,7 +5,7 @@ using System; using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { /// /// A filter factory which creates a new instance of . diff --git a/src/Microsoft.AspNet.Mvc.Cors/DisableCorsAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.Cors/DisableCorsAuthorizationFilter.cs rename to src/Microsoft.AspNet.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs index 8b494d5dfe..195a134a94 100644 --- a/src/Microsoft.AspNet.Mvc.Cors/DisableCorsAuthorizationFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs @@ -8,7 +8,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { /// /// An which ensures that an action does not run for a pre-flight request. diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ICorsAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs similarity index 82% rename from src/Microsoft.AspNet.Mvc.Core/Filters/ICorsAuthorizationFilter.cs rename to src/Microsoft.AspNet.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs index c39fad50aa..6e98733646 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ICorsAuthorizationFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.Filters +using Microsoft.AspNet.Mvc.Filters; + +namespace Microsoft.AspNet.Mvc.Cors.Internal { /// /// A filter which can be used to enable/disable cors support for a resource. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs index 19ed87108c..2e9986d766 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs @@ -2,8 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.DataAnnotations; using Microsoft.AspNet.Mvc.DataAnnotations.Internal; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/IAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/IAttributeAdapter.cs index 2bccba3acb..0e2ec9d6d8 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/IAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/IAttributeAdapter.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations { /// /// Interface so that adapters provide their relevent values to error messages. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/AttributeAdapterBase.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/AttributeAdapterBase.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/AttributeAdapterBase.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/AttributeAdapterBase.cs index 884584cf06..12379d7f14 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/AttributeAdapterBase.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/AttributeAdapterBase.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.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An abstract subclass of which wraps up all the required diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/CompareAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/CompareAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs index 92e3a04e46..371ca0d083 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/CompareAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs @@ -5,9 +5,11 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Globalization; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class CompareAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs index ba1f48af0a..eabc82f5d5 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs @@ -4,11 +4,11 @@ using System; using System.ComponentModel.DataAnnotations; using System.Linq; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of which provides client validators diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs index 7f5d2c9ac5..0401bead7c 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs index 426f515a52..5ed1a5e581 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs @@ -6,8 +6,10 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Reflection; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of and for diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs index 11c7320141..2bfeeca853 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs @@ -5,10 +5,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// Validates based on the given . diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidatorProvider.cs similarity index 97% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidatorProvider.cs index 7e252d1ae8..c6dd65ea01 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidatorProvider.cs @@ -3,14 +3,14 @@ using System; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; #if DOTNET5_4 using System.Reflection; #endif +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of which provides validators diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs index 58b55e209a..43fd38a8c0 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// A validation adapter that is used to map 's to a single client side validation diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs similarity index 88% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs index d79c870a9b..fab9751570 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs @@ -2,15 +2,16 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// A default implementation of . /// /// /// The provides validators from - /// instances in . + /// instances in . /// public class DefaultClientModelValidatorProvider : IClientModelValidatorProvider { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs index 1b42ba6a14..31871144f3 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class MaxLengthAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs index f63e7be46c..68ff04fc32 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class MinLengthAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationEqualToRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationEqualToRule.cs similarity index 89% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationEqualToRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationEqualToRule.cs index bf79b2f9c9..8f795d6989 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationEqualToRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationEqualToRule.cs @@ -2,8 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// Represents client side validation rule that determines if two values are equal. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMaxLengthRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMaxLengthRule.cs similarity index 85% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMaxLengthRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMaxLengthRule.cs index 5b7a55404f..7bbcfdf9c4 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMaxLengthRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMaxLengthRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationMaxLengthRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMinLengthRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMinLengthRule.cs similarity index 85% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMinLengthRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMinLengthRule.cs index 3da7641fd2..a472ab2473 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationMinLengthRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationMinLengthRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationMinLengthRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationNumericRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationNumericRule.cs similarity index 88% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationNumericRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationNumericRule.cs index 05df63a743..ea39a7c32d 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationNumericRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationNumericRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// This is a for numeric values. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRangeRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRangeRule.cs similarity index 90% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRangeRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRangeRule.cs index 4e7a3c699d..5fe0a452da 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRangeRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRangeRule.cs @@ -2,8 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationRangeRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRegexRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRegexRule.cs similarity index 84% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRegexRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRegexRule.cs index 24a5715182..c19ae70e35 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRegexRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRegexRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationRegexRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRequiredRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRequiredRule.cs similarity index 81% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRequiredRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRequiredRule.cs index 24d6488394..acc7bc5d89 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationRequiredRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationRequiredRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationRequiredRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationStringLengthRule.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationStringLengthRule.cs similarity index 89% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationStringLengthRule.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationStringLengthRule.cs index ef3827f91e..e083c21f41 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ModelClientValidationStringLengthRule.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ModelClientValidationStringLengthRule.cs @@ -1,7 +1,9 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +using Microsoft.AspNet.Mvc.ModelBinding.Validation; + +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ModelClientValidationStringLengthRule : ModelClientValidationRule { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs index 640e8e22d3..285e49ce35 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Options; namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs index 3bc2333c39..8ed7dcd7ad 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs @@ -2,8 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Mvc.ModelBinding.Metadata; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidator.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs similarity index 89% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidator.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs index fe31bbf823..43925fe8fe 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidator.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs @@ -3,9 +3,10 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of that provides the rule for validating diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs similarity index 91% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs index 46572651fc..0f647ba3df 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs @@ -2,8 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of which provides client validators diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/RangeAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/RangeAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs index 2c2cda0277..ed885ce9bc 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/RangeAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class RangeAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs index cbb49dbd38..0d4f0f4795 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class RegularExpressionAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/RequiredAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs similarity index 92% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/RequiredAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs index 7bd749d5d5..b081b98b36 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/RequiredAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class RequiredAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs index 2cdb48e184..682220f593 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class StringLengthAttributeAdapter : AttributeAdapterBase { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidatableObjectAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs similarity index 95% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ValidatableObjectAdapter.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs index c6a4dd9b3a..cc367d9b7a 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidatableObjectAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs @@ -5,9 +5,9 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ValidatableObjectAdapter : IModelValidator { diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterOfTAttribute.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterOfTAttribute.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterOfTAttribute.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterOfTAttribute.cs index ef0f39b67e..3046a477be 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterOfTAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterOfTAttribute.cs @@ -4,9 +4,11 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// An implementation of which understands data annotation attributes. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterProvider.cs similarity index 96% rename from src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs rename to src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterProvider.cs index ef3ebfe809..9c5d9cc959 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/Internal/ValidationAttributeAdapterProvider.cs @@ -3,11 +3,9 @@ using System; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { /// /// Creates an for the given attribute. diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationOptions.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationOptions.cs index f7d8096018..a5da2e0e3a 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationOptions.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationOptions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Localization; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations { /// /// Provides programmatic configuration for DataAnnotations localization in the MVC framework. diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs index 0045efd44c..56245d32d8 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs @@ -13,6 +13,7 @@ using Microsoft.AspNet.Antiforgery; using Microsoft.AspNet.Html; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Razor.Internal; using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.Routing; diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/Internal/MvcViewOptionsSetup.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/Internal/MvcViewOptionsSetup.cs index 7da8e3db7e..db2997d62d 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/Internal/MvcViewOptionsSetup.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/Internal/MvcViewOptionsSetup.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Mvc.DataAnnotations; -using Microsoft.AspNet.Mvc.ModelBinding.Validation; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvoker.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvoker.cs index 4a32265cd6..e2e3bf4531 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvoker.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Html; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Diagnostics; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ViewFeatures; using Microsoft.AspNet.Mvc.ViewFeatures.Logging; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvokerFactory.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvokerFactory.cs index 3f7ff0920d..cdbb5a5f81 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvokerFactory.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentInvokerFactory.cs @@ -3,7 +3,7 @@ using System; using System.Diagnostics; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNet.Mvc.ViewComponents diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/PartialViewResultExecutor.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/PartialViewResultExecutor.cs index a68a17e60f..b018854bef 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/PartialViewResultExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/PartialViewResultExecutor.cs @@ -7,7 +7,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Diagnostics; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.ViewEngines; using Microsoft.AspNet.Mvc.ViewFeatures.Logging; diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/ViewResultExecutor.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/ViewResultExecutor.cs index e5756f8744..bf4bd816ae 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/ViewResultExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/ViewFeatures/ViewResultExecutor.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Logging; using Microsoft.AspNet.Mvc.ViewEngines; using Microsoft.Extensions.Logging; diff --git a/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs index 03820649c5..575f50bc9f 100644 --- a/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs +++ b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs b/test/Microsoft.AspNet.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs index 1ddb192770..d5833def1a 100644 --- a/test/Microsoft.AspNet.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs @@ -13,6 +13,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; @@ -105,8 +106,8 @@ namespace Microsoft.AspNet.Mvc.Description var action = CreateActionDescriptor(); action.ActionConstraints = new List() { - new ActionConstraints.HttpMethodConstraint(new string[] { "PUT", "POST" }), - new ActionConstraints.HttpMethodConstraint(new string[] { "GET" }), + new HttpMethodActionConstraint(new string[] { "PUT", "POST" }), + new HttpMethodActionConstraint(new string[] { "GET" }), }; // Act diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs index 0bfd840b3c..0308ab0668 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs @@ -4,10 +4,8 @@ using System; using System.Collections.Generic; using System.Reflection; -using Microsoft.AspNet.Mvc.Abstractions; -using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Filters; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Routing; using Xunit; @@ -55,7 +53,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels new MyFilterAttribute(), }); - action.ActionConstraints.Add(new HttpMethodConstraint(new string[] { "GET" })); + action.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" })); action.ActionName = "Edit"; action.Controller = new ControllerModel(typeof(TestController).GetTypeInfo(), diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs index 97b99d43c9..bb1dd49325 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs @@ -7,6 +7,7 @@ using System.Reflection; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Routing; using Xunit; @@ -60,7 +61,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels new MyFilterAttribute(), }); - controller.ActionConstraints.Add(new HttpMethodConstraint(new string[] { "GET" })); + controller.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" })); controller.Application = new ApplicationModel(); controller.ControllerName = "cool"; controller.Filters.Add(new MyFilterAttribute()); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ConsumesAttributeTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ConsumesAttributeTests.cs index aec009db53..27f32028ac 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ConsumesAttributeTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ConsumesAttributeTests.cs @@ -9,6 +9,7 @@ using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.Net.Http.Headers; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerBaseTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerBaseTest.cs index eadfc83df8..8abd1f8ee9 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerBaseTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerBaseTest.cs @@ -10,7 +10,10 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; +using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.TestCommon; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs index 66d64a8142..bf993a144a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs @@ -4,7 +4,7 @@ using System; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Moq; using Xunit; @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Controllers public void Create_CreatesInstancesOfTypes(Type type) { // Arrange - var activator = new DefaultControllerActivator(new DefaultTypeActivatorCache()); + var activator = new DefaultControllerActivator(new TypeActivatorCache()); var serviceProvider = new Mock(MockBehavior.Strict); var httpContext = new DefaultHttpContext @@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Mvc.Controllers public void Create_TypeActivatesTypesWithServices() { // Arrange - var activator = new DefaultControllerActivator(new DefaultTypeActivatorCache()); + var activator = new DefaultControllerActivator(new TypeActivatorCache()); var serviceProvider = new Mock(MockBehavior.Strict); var testService = new TestService(); serviceProvider.Setup(s => s.GetService(typeof(TestService))) diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs index ba732e6b29..9d4cd1f1e1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs @@ -5,6 +5,7 @@ using System; using System.Reflection; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Moq; @@ -66,7 +67,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act var result = factory.CreateController(context); @@ -93,7 +94,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act var result = factory.CreateController(context); @@ -120,7 +121,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act var result = factory.CreateController(context); @@ -147,7 +148,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act var result = factory.CreateController(context); @@ -175,7 +176,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act and Assert var exception = Assert.Throws(() => factory.CreateController(context)); @@ -206,7 +207,7 @@ namespace Microsoft.AspNet.Mvc.Controllers RequestServices = GetServices(), }, }; - var factory = CreateControllerFactory(new DefaultControllerActivator(new DefaultTypeActivatorCache())); + var factory = CreateControllerFactory(new DefaultControllerActivator(new TypeActivatorCache())); // Act and Assert var exception = Assert.Throws(() => factory.CreateController(context)); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/TestController.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/TestController.cs deleted file mode 100644 index 073fe810fe..0000000000 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/TestController.cs +++ /dev/null @@ -1,120 +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.ComponentModel; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.Mvc.Controllers -{ - public class TestController - { - public static void VoidAction() - { - } - -#pragma warning disable 1998 - public async Task TaskAction(int i, string s) - { - return; - } -#pragma warning restore 1998 - -#pragma warning disable 1998 - public async Task TaskValueTypeAction(int i, string s) - { - return i; - } -#pragma warning restore 1998 - -#pragma warning disable 1998 - public async Task> TaskOfTaskAction(int i, string s) - { - return TaskValueTypeAction(i, s); - } -#pragma warning restore 1998 - - public Task TaskValueTypeActionWithoutAsync(int i, string s) - { - return TaskValueTypeAction(i, s); - } - -#pragma warning disable 1998 - public async Task TaskActionWithException(int i, string s) - { - throw new NotImplementedException("Not Implemented Exception"); - } -#pragma warning restore 1998 - - public Task TaskActionWithExceptionWithoutAsync(int i, string s) - { - throw new NotImplementedException("Not Implemented Exception"); - } - - public async Task TaskActionThrowAfterAwait(int i, string s) - { - await Task.Delay(500); - throw new ArgumentException("Argument Exception"); - } - - public TaskDerivedType TaskActionWithCustomTaskReturnType(int i, string s) - { - return new TaskDerivedType(); - } - - public TaskOfTDerivedType TaskActionWithCustomTaskOfTReturnType(int i, string s) - { - return new TaskOfTDerivedType(1); - } - - /// - /// Returns a instead of a . This should throw an - /// . - /// - public Task UnwrappedTask(int i, string s) - { - return Task.Factory.StartNew(async () => await Task.Delay(50)); - } - - public string Echo(string input) - { - return input; - } - - public string EchoWithException(string input) - { - throw new NotImplementedException(); - } - - public string EchoWithDefaultValue([DefaultValue("hello")] string input) - { - return input; - } - - public string EchoWithDefaultValueAndAttribute([DefaultValue("hello")] string input = "world") - { - return input; - } - - public dynamic ReturnTaskAsDynamicValue(int i, string s) - { - return Task.Factory.StartNew(() => i); - } - - public class TaskDerivedType : Task - { - public TaskDerivedType() - : base(() => Console.WriteLine("In The Constructor")) - { - } - } - - public class TaskOfTDerivedType : Task - { - public TaskOfTDerivedType(T input) - : base(() => input) - { - } - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtActionResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtActionResultTests.cs index 2c9e63ea6d..91c0e9f25f 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtActionResultTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtActionResultTests.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Testing; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtRouteResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtRouteResultTests.cs index e1aa346692..7deb744f67 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtRouteResultTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedAtRouteResultTests.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Testing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedResultTests.cs index 3423913865..0fbf26d264 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/CreatedResultTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/CreatedResultTests.cs @@ -9,6 +9,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.AspNet.WebUtilities; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/InputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/InputFormatterTest.cs index fcbf665690..781b2e0c2c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/InputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/InputFormatterTest.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/MediaTypeComparisonsTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/MediaTypeComparisonsTest.cs deleted file mode 100644 index d16c4a4704..0000000000 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/MediaTypeComparisonsTest.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.Extensions.Primitives; -using Xunit; - -namespace Microsoft.AspNet.Mvc.Formatters -{ - public class MediaTypeComparisonsTest - { - - } -} diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs index dc41479212..7a2690df7f 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Testing; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/HttpOkObjectResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/HttpOkObjectResultTest.cs index 4f3fb90f8c..a6ded3e283 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/HttpOkObjectResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/HttpOkObjectResultTest.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultActionSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultActionSelectorTests.cs index 779a010f86..b86c55f4f4 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultActionSelectorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultActionSelectorTests.cs @@ -11,6 +11,7 @@ using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Controllers; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; @@ -59,7 +60,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure { ActionConstraints = new List() { - new HttpMethodConstraint(new string[] { "POST" }), + new HttpMethodActionConstraint(new string[] { "POST" }), }, Parameters = new List(), }; @@ -518,7 +519,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure serviceContainer.AddSingleton(typeof(IEnumerable), list); - var actionDescriptorCollectionProvider = new DefaultActionDescriptorCollectionProvider( + var actionDescriptorCollectionProvider = new ActionDescriptorCollectionProvider( serviceContainer.BuildServiceProvider()); var decisionTreeProvider = new ActionSelectorDecisionTreeProvider(actionDescriptorCollectionProvider); @@ -527,7 +528,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure new DefaultActionConstraintProvider(), }; - var defaultActionSelector = new DefaultActionSelector( + var defaultActionSelector = new ActionSelector( decisionTreeProvider, actionConstraintProviders, NullLoggerFactory.Instance); @@ -595,7 +596,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure .Where(a => a.RouteConstraints.Any(c => c.RouteKey == "action" && comparer.Equals(c.RouteValue, action))); } - private static DefaultActionSelector CreateSelector(IReadOnlyList actions, ILoggerFactory loggerFactory = null) + private static ActionSelector CreateSelector(IReadOnlyList actions, ILoggerFactory loggerFactory = null) { loggerFactory = loggerFactory ?? NullLoggerFactory.Instance; @@ -611,7 +612,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure new BooleanConstraintProvider(), }; - return new DefaultActionSelector( + return new ActionSelector( decisionTreeProvider, actionConstraintProviders, loggerFactory); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/ObjectResultExecutorTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/ObjectResultExecutorTest.cs index f00a048cb8..02c839cf4a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/ObjectResultExecutorTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/ObjectResultExecutorTest.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Http; @@ -18,7 +17,7 @@ using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; using Xunit; -namespace Microsoft.AspNet.Mvc.Infrastructure +namespace Microsoft.AspNet.Mvc.Internal { public class ObjectResultExecutorTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs index 4ef9ec7854..d0131a1d2d 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Microsoft.Extensions.Primitives; using Xunit; -namespace Microsoft.AspNet.Mvc.Formatters +namespace Microsoft.AspNet.Mvc.Formatters.Internal { public class AcceptHeaderParserTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRouteTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRouteTest.cs index 055aa12454..9c0270d569 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRouteTest.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Internal; using Microsoft.AspNet.Routing.Tree; @@ -18,7 +19,7 @@ using Microsoft.Extensions.WebEncoders.Testing; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { public class AttributeRouteTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRoutingTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRoutingTest.cs index c5398f3923..2d6638ce5c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AttributeRoutingTest.cs @@ -12,6 +12,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Tree; using Microsoft.Extensions.DependencyInjection; @@ -22,7 +23,7 @@ using Microsoft.Extensions.WebEncoders.Testing; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Routing +namespace Microsoft.AspNet.Mvc.Internal { public class AttributeRoutingTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AuthorizationApplicationModelProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AuthorizationApplicationModelProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs index 1d1369be26..c13fbf48fc 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AuthorizationApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs @@ -4,10 +4,11 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Authorization; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Filters; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModels +namespace Microsoft.AspNet.Mvc.Internal { public class AuthorizationApplicationModelProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeFilterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizeFilterTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeFilterTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizeFilterTest.cs index e71ed3824a..a803f80d6c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeFilterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/AuthorizeFilterTest.cs @@ -9,12 +9,13 @@ using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Authentication; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class AuthorizeFilterTest { @@ -273,7 +274,9 @@ namespace Microsoft.AspNet.Mvc.Filters Assert.NotNull(authorizationContext.Result); } - private AuthorizationContext GetAuthorizationContext(Action registerServices, bool anonymous = false) + private Filters.AuthorizationContext GetAuthorizationContext( + Action registerServices, + bool anonymous = false) { var basicPrincipal = new ClaimsPrincipal( new ClaimsIdentity( @@ -328,7 +331,7 @@ namespace Microsoft.AspNet.Mvc.Filters routeData: new RouteData(), actionDescriptor: new ActionDescriptor()); - var authorizationContext = new AuthorizationContext( + var authorizationContext = new Filters.AuthorizationContext( actionContext, Enumerable.Empty().ToList() ); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorBuilderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs index 9bb0d64991..12e9e1b7f5 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorBuilderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs @@ -5,10 +5,11 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.AspNet.Mvc.ApplicationModels; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.ModelBinding; using Xunit; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionDescriptorBuilderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorProviderTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs index d2ef94671f..f1f05be65b 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionDescriptorProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs @@ -9,15 +9,17 @@ using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.ApplicationModels; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing.Tree; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionDescriptorProviderTests { @@ -78,7 +80,7 @@ namespace Microsoft.AspNet.Mvc.Controllers // Assert Assert.Equal("OnlyPost", descriptor.Name); - var constraint = Assert.IsType(Assert.Single(descriptor.ActionConstraints)); + var constraint = Assert.IsType(Assert.Single(descriptor.ActionConstraints)); Assert.Equal(new string[] { "POST" }, constraint.HttpMethods); } @@ -95,7 +97,7 @@ namespace Microsoft.AspNet.Mvc.Controllers // Assert Assert.Equal("Items", descriptor.AttributeRouteInfo.Template); - var constraint = Assert.IsType(Assert.Single(descriptor.ActionConstraints)); + var constraint = Assert.IsType(Assert.Single(descriptor.ActionConstraints)); Assert.Equal(new string[] { "PUT", "PATCH" }, constraint.HttpMethods); } @@ -573,7 +575,7 @@ namespace Microsoft.AspNet.Mvc.Controllers Assert.Equal("MultiRouteAttributes", action.ControllerName); Assert.NotNull(action.ActionConstraints); - var methodConstraint = Assert.IsType(Assert.Single(action.ActionConstraints)); + var methodConstraint = Assert.IsType(Assert.Single(action.ActionConstraints)); Assert.NotNull(methodConstraint.HttpMethods); Assert.Equal(new[] { "POST" }, methodConstraint.HttpMethods); @@ -598,7 +600,7 @@ namespace Microsoft.AspNet.Mvc.Controllers Assert.Equal("MultiRouteAttributes", action.ControllerName); Assert.NotNull(action.ActionConstraints); - var methodConstraint = Assert.IsType(Assert.Single(action.ActionConstraints)); + var methodConstraint = Assert.IsType(Assert.Single(action.ActionConstraints)); Assert.NotNull(methodConstraint.HttpMethods); Assert.Equal(new[] { "PUT" }, methodConstraint.HttpMethods); @@ -633,14 +635,14 @@ namespace Microsoft.AspNet.Mvc.Controllers // Actions generated by PutAttribute var putActions = constrainedActions.Where( - a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "PUT"); + a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "PUT"); Assert.Equal(2, putActions.Count()); Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v1/All")); Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v2/All")); // Actions generated by RouteAttribute var routeActions = actions.Where( - a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "POST"); + a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "POST"); Assert.Equal(2, routeActions.Count()); Assert.Single(routeActions, a => a.AttributeRouteInfo.Template.Equals("v1/List")); Assert.Single(routeActions, a => a.AttributeRouteInfo.Template.Equals("v2/List")); @@ -672,14 +674,14 @@ namespace Microsoft.AspNet.Mvc.Controllers // Actions generated by AcceptVerbs var postActions = constrainedActions.Where( - a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "POST"); + a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "POST"); Assert.Equal(2, postActions.Count()); Assert.Single(postActions, a => a.AttributeRouteInfo.Template.Equals("v1")); Assert.Single(postActions, a => a.AttributeRouteInfo.Template.Equals("v2")); // Actions generated by PutAttribute var putActions = constrainedActions.Where( - a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "PUT"); + a => a.ActionConstraints.OfType().Single().HttpMethods.Single() == "PUT"); Assert.Equal(2, putActions.Count()); Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v1/All")); Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v2/All")); @@ -734,7 +736,7 @@ namespace Microsoft.AspNet.Mvc.Controllers var action = Assert.Single( actions, a => a.ActionConstraints - .OfType() + .OfType() .SelectMany(c => c.HttpMethods) .Contains(method)); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ActionExecutorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionExecutorTests.cs similarity index 82% rename from test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ActionExecutorTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionExecutorTests.cs index 91098f7e6f..f817606e98 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ActionExecutorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionExecutorTests.cs @@ -3,15 +3,16 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Globalization; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNet.Testing; using Xunit; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { - public class ActionExecutorTests + public class ControllerActionExecutorTests { private TestController _controller = new TestController(); @@ -401,5 +402,116 @@ namespace Microsoft.AspNet.Mvc.Controllers Assert.Equal(expectedException, ex.Message); } + + public class TestController + { + public static void VoidAction() + { + } + +#pragma warning disable 1998 + public async Task TaskAction(int i, string s) + { + return; + } +#pragma warning restore 1998 + +#pragma warning disable 1998 + public async Task TaskValueTypeAction(int i, string s) + { + return i; + } +#pragma warning restore 1998 + +#pragma warning disable 1998 + public async Task> TaskOfTaskAction(int i, string s) + { + return TaskValueTypeAction(i, s); + } +#pragma warning restore 1998 + + public Task TaskValueTypeActionWithoutAsync(int i, string s) + { + return TaskValueTypeAction(i, s); + } + +#pragma warning disable 1998 + public async Task TaskActionWithException(int i, string s) + { + throw new NotImplementedException("Not Implemented Exception"); + } +#pragma warning restore 1998 + + public Task TaskActionWithExceptionWithoutAsync(int i, string s) + { + throw new NotImplementedException("Not Implemented Exception"); + } + + public async Task TaskActionThrowAfterAwait(int i, string s) + { + await Task.Delay(500); + throw new ArgumentException("Argument Exception"); + } + + public TaskDerivedType TaskActionWithCustomTaskReturnType(int i, string s) + { + return new TaskDerivedType(); + } + + public TaskOfTDerivedType TaskActionWithCustomTaskOfTReturnType(int i, string s) + { + return new TaskOfTDerivedType(1); + } + + /// + /// Returns a instead of a . This should throw an + /// . + /// + public Task UnwrappedTask(int i, string s) + { + return Task.Factory.StartNew(async () => await Task.Delay(50)); + } + + public string Echo(string input) + { + return input; + } + + public string EchoWithException(string input) + { + throw new NotImplementedException(); + } + + public string EchoWithDefaultValue([DefaultValue("hello")] string input) + { + return input; + } + + public string EchoWithDefaultValueAndAttribute([DefaultValue("hello")] string input = "world") + { + return input; + } + + public dynamic ReturnTaskAsDynamicValue(int i, string s) + { + return Task.Factory.StartNew(() => i); + } + + public class TaskDerivedType : Task + { + public TaskDerivedType() + : base(() => Console.WriteLine("In The Constructor")) + { + } + } + + public class TaskOfTDerivedType : Task + { + public TaskOfTDerivedType(T input) + : base(() => input) + { + } + } + } } } \ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionInvokerTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionInvokerTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs index 5d03b4a56a..8a6a65eece 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionInvokerTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs @@ -11,11 +11,13 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Testing; @@ -26,7 +28,7 @@ using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { public class ControllerActionInvokerTest { @@ -2110,7 +2112,7 @@ namespace Microsoft.AspNet.Mvc.Controllers controllerFactory.Object, actionDescriptor, new IInputFormatter[0], - new DefaultControllerActionArgumentBinder( + new ControllerArgumentBinder( metadataProvider, new DefaultObjectValidator(metadataProvider)), new IModelBinder[] { binder.Object }, @@ -2225,7 +2227,7 @@ namespace Microsoft.AspNet.Mvc.Controllers private static FilterCache CreateFilterCache(IFilterProvider[] filterProviders = null) { var services = new ServiceCollection().BuildServiceProvider(); - var descriptorProvider = new DefaultActionDescriptorCollectionProvider(services); + var descriptorProvider = new ActionDescriptorCollectionProvider(services); return new FilterCache(descriptorProvider, filterProviders.AsEnumerable() ?? new List()); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionArgumentBinderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerArgumentBinderTests.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionArgumentBinderTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerArgumentBinderTests.cs index cbf7c05ce4..9027ccbfc8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Controllers/ControllerActionArgumentBinderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ControllerArgumentBinderTests.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Test; using Microsoft.AspNet.Mvc.ModelBinding.Validation; @@ -14,9 +15,9 @@ using Microsoft.AspNet.Routing; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Controllers +namespace Microsoft.AspNet.Mvc.Internal { - public class ControllerActionArgumentBinderTests + public class ControllerArgumentBinderTests { [Fact] public async Task BindActionArgumentsAsync_DoesNotAddActionArguments_IfBinderReturnsNull() @@ -617,14 +618,14 @@ namespace Microsoft.AspNet.Mvc.Controllers return context; } - private static DefaultControllerActionArgumentBinder GetArgumentBinder(IObjectModelValidator validator = null) + private static ControllerArgumentBinder GetArgumentBinder(IObjectModelValidator validator = null) { if (validator == null) { validator = CreateMockValidator(); } - return new DefaultControllerActionArgumentBinder( + return new ControllerArgumentBinder( TestModelMetadataProvider.CreateDefaultProvider(), validator); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultApplicationModelProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultApplicationModelProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs index 84da725eb5..6451a8b5c4 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs @@ -6,13 +6,15 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Infrastructure; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.Routing; using Microsoft.Extensions.Options; using Xunit; -namespace Microsoft.AspNet.Mvc.ApplicationModels +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultApplicationModelProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs index 14b7963c5d..6dcfbded49 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs @@ -2,9 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultModelMetadataBindingDetailsProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs index ab388f0a3b..730e4aa177 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs @@ -5,9 +5,11 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultCollectionValidationStrategyTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs similarity index 94% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs index 3b6b8bdab2..64b914cdf9 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs @@ -3,9 +3,11 @@ using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultComplexObjectValidationStrategyTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultModelValidatorProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultModelValidatorProviderTest.cs index 5201e92c4b..4b2b3294a8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultModelValidatorProviderTest.cs @@ -4,9 +4,12 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { // Integration tests for the default configuration of ModelMetadata and Validation providers public class DefaultModelValidatorProviderTest diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs index f7dca4eb22..80fb8aaa55 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs @@ -9,13 +9,15 @@ using System.Linq; using System.Reflection; #endif using Microsoft.AspNet.Http; +using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Metadata; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultObjectValidatorTests { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs index 4a012784a0..f98f5efe9c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs @@ -4,9 +4,10 @@ using System; using System.Globalization; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.ModelBinding; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding +namespace Microsoft.AspNet.Mvc.Internal { public class ElementalValueProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs index 4ea66e4ad5..3aa71c7ac7 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs @@ -5,10 +5,12 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class ExplicitIndexCollectionValidationStrategyTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterCacheTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterCacheTest.cs index 74c206fa4a..abd41b5429 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterCacheTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterCacheTest.cs @@ -150,7 +150,7 @@ namespace Microsoft.AspNet.Mvc.Internal private static FilterCache CreateCache(params IFilterProvider[] providers) { var services = CreateServices(); - var descriptorProvider = new DefaultActionDescriptorCollectionProvider(services); + var descriptorProvider = new ActionDescriptorCollectionProvider(services); return new FilterCache(descriptorProvider, providers); } } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterProviderTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterProviderTest.cs index a87f5997d5..989cdc5cef 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/FilterProviderTest.cs @@ -6,11 +6,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Routing; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class DefaultFilterProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/HttpMethodConstraintTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs similarity index 84% rename from test/Microsoft.AspNet.Mvc.Core.Test/HttpMethodConstraintTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs index 5868ee3e69..6df9b5e5c8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/HttpMethodConstraintTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs @@ -9,9 +9,9 @@ using Microsoft.AspNet.Routing; using Microsoft.Extensions.Primitives; using Xunit; -namespace Microsoft.AspNet.Mvc +namespace Microsoft.AspNet.Mvc.Internal { - public class HttpMethodConstraintTest + public class HttpMethodActionConstraintTest { public static TheoryData AcceptCaseInsensitiveData = new TheoryData, string> @@ -26,10 +26,10 @@ namespace Microsoft.AspNet.Mvc [Theory] [MemberData(nameof(AcceptCaseInsensitiveData))] - public void HttpMethodConstraint_Accept_Preflight_CaseInsensitive(IEnumerable httpMethods, string accessControlMethod) + public void HttpMethodActionConstraint_Accept_Preflight_CaseInsensitive(IEnumerable httpMethods, string accessControlMethod) { // Arrange - var constraint = new HttpMethodConstraint(httpMethods); + var constraint = new HttpMethodActionConstraint(httpMethods); var context = CreateActionConstraintContext(constraint); context.RouteContext = CreateRouteContext("oPtIoNs", accessControlMethod); @@ -42,10 +42,10 @@ namespace Microsoft.AspNet.Mvc [Theory] [MemberData(nameof(AcceptCaseInsensitiveData))] - public void HttpMethodConstraint_Accept_CaseInsensitive(IEnumerable httpMethods, string expectedMethod) + public void HttpMethodActionConstraint_Accept_CaseInsensitive(IEnumerable httpMethods, string expectedMethod) { // Arrange - var constraint = new HttpMethodConstraint(httpMethods); + var constraint = new HttpMethodActionConstraint(httpMethods); var context = CreateActionConstraintContext(constraint); context.RouteContext = CreateRouteContext(expectedMethod); @@ -56,7 +56,7 @@ namespace Microsoft.AspNet.Mvc Assert.True(result, "Request should have been accepted."); } - private static ActionConstraintContext CreateActionConstraintContext(HttpMethodConstraint constraint) + private static ActionConstraintContext CreateActionConstraintContext(HttpMethodActionConstraint constraint) { var context = new ActionConstraintContext(); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ReferenceEqualityComparerTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ReferenceEqualityComparerTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs index deebca369d..3fff5262a8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ReferenceEqualityComparerTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs @@ -4,7 +4,7 @@ using System; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class ReferenceEqualityComparerTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/ResponseCacheFilterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ResponseCacheFilterTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Core.Test/Filters/ResponseCacheFilterTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ResponseCacheFilterTest.cs index 1942ec4257..9eb59c426e 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/ResponseCacheFilterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ResponseCacheFilterTest.cs @@ -5,10 +5,11 @@ using System; using System.Collections.Generic; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; +using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Routing; using Xunit; -namespace Microsoft.AspNet.Mvc.Filters +namespace Microsoft.AspNet.Mvc.Internal { public class ResponseCacheFilterTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs index 4dae37c485..b98a060f8e 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.Internal { public class ShortFormDictionaryValidationStrategyTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CollectionModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CollectionModelBinderTest.cs index 6a47587906..bae6fbe5aa 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CollectionModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CollectionModelBinderTest.cs @@ -7,11 +7,13 @@ using System.Globalization; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; +using Microsoft.AspNet.Mvc.Internal; +using Microsoft.AspNet.Mvc.ModelBinding.Test; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Test +namespace Microsoft.AspNet.Mvc.ModelBinding { public class CollectionModelBinderTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CompositeModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CompositeModelBinderTest.cs index 34759ccf48..13cb6e197c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CompositeModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/CompositeModelBinderTest.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/DictionaryModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/DictionaryModelBinderTest.cs index 8424e4265a..8078936dda 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/DictionaryModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/DictionaryModelBinderTest.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Primitives; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/KeyValuePairModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/KeyValuePairModelBinderTest.cs index 7c3f784820..baf26df1c3 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/KeyValuePairModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/KeyValuePairModelBinderTest.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs index b8653bf2fb..bb08a57101 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Xml; +using Microsoft.AspNet.Mvc.Internal; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs index b1bbf1b768..74bd956f50 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs @@ -3,12 +3,13 @@ using System; using System.Collections.Generic; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata { - public class DefaultValidationMetadataTest + public class DefaultValidationMetadataProviderTest { [Fact] public void GetValidationDetails_MarkedWithClientValidator_ReturnsValidator() diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs index ee76208ed5..d205f6e06f 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs @@ -1,6 +1,8 @@ // 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 Microsoft.AspNet.Mvc.Internal; + namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata { public class EmptyCompositeMetadataDetailsProvider : DefaultCompositeMetadataDetailsProvider diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs index 0bf10f9a49..a1109feb61 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs @@ -9,7 +9,10 @@ using System.Linq.Expressions; using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Internal; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Routing; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/SimpleValueProvider.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/SimpleValueProvider.cs index cebd602948..23dfe6b770 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/SimpleValueProvider.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/SimpleValueProvider.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding.Test { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ObjectResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ObjectResultTests.cs index 71f0dbcf99..82d225380a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ObjectResultTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ObjectResultTests.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ProducesAttributeTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ProducesAttributeTests.cs index 535e16d186..c32f560b19 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ProducesAttributeTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ProducesAttributeTests.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters; +using Microsoft.AspNet.Mvc.Formatters.Internal; using Microsoft.AspNet.Mvc.TestCommon; using Microsoft.AspNet.Routing; using Microsoft.Extensions.Primitives; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ResponseCacheAttributeTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ResponseCacheAttributeTest.cs index cfc47007cd..61da4bc7b9 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ResponseCacheAttributeTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ResponseCacheAttributeTest.cs @@ -7,6 +7,7 @@ using System.Linq; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Filters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs index f9052cbd44..069a6a0cdb 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Moq; using Xunit; @@ -176,7 +177,7 @@ namespace Microsoft.AspNet.Mvc.Routing context.Setup(o => o.RequestServices .GetService(typeof(IActionDescriptorCollectionProvider))) - .Returns(new DefaultActionDescriptorCollectionProvider(context.Object.RequestServices)); + .Returns(new ActionDescriptorCollectionProvider(context.Object.RequestServices)); return context.Object; } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/RouteTemplateProviderAttributesTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/RouteTemplateProviderAttributesTest.cs index e4ad00d8f0..c11949ffed 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/RouteTemplateProviderAttributesTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/RouteTemplateProviderAttributesTest.cs @@ -1,7 +1,6 @@ // 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 Microsoft.AspNet.Mvc.Infrastructure; using Xunit; namespace Microsoft.AspNet.Mvc.Routing diff --git a/test/Microsoft.AspNet.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs b/test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs rename to test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs index c5b9157f43..ce44738978 100644 --- a/test/Microsoft.AspNet.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs @@ -5,9 +5,10 @@ using System.Linq; using System.Reflection; using Microsoft.AspNet.Cors; using Microsoft.AspNet.Mvc.ApplicationModels; +using Microsoft.AspNet.Mvc.Internal; using Xunit; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { public class CorsApplicationModelProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Cors.Test/CorsAuthorizationFilterTest.cs b/test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsAuthorizationFilterTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Cors.Test/CorsAuthorizationFilterTest.cs rename to test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsAuthorizationFilterTest.cs index 1c8deca609..03c5d545e4 100644 --- a/test/Microsoft.AspNet.Mvc.Cors.Test/CorsAuthorizationFilterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Cors.Test/Internal/CorsAuthorizationFilterTest.cs @@ -17,7 +17,7 @@ using Microsoft.Extensions.Logging.Testing; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.Cors +namespace Microsoft.AspNet.Mvc.Cors.Internal { public class CorsAuthorizationFilterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs index 4a40a5df5a..7f94b79830 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs @@ -2,13 +2,15 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.AspNet.Testing.xunit; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class CompareAttributeAdapterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs similarity index 96% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs index 1d12d49cbd..7b5d5c293d 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs @@ -1,14 +1,12 @@ // 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.ComponentModel.DataAnnotations; -using System.Linq; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataAnnotationsClientModelValidatorProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs index a556fcb1cd..d3141ca6d5 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs @@ -5,10 +5,12 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataAnnotationsMetadataProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorProviderTest.cs index 4bb2f052ec..6987b107dd 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorProviderTest.cs @@ -3,11 +3,12 @@ using System.ComponentModel.DataAnnotations; using System.Linq; -using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataAnnotationsModelValidatorProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs index b3653936b7..134113f847 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs @@ -1,18 +1,19 @@ // 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.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataAnnotationsModelValidatorTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs index 90f3201231..8b59b92b8f 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs @@ -2,9 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Runtime.Serialization; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataMemberRequiredBindingMetadataProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs similarity index 93% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs index ed84fae83c..a1e1d9d021 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs @@ -2,9 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class DataTypeClientModelValidatorProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs index 43b3878280..7a3cc9eb21 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs @@ -5,9 +5,11 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { // Integration tests for the default configuration of ModelMetadata and Validation providers public class DefaultModelClientValidatorProviderTest diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs similarity index 97% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs index 2ac9af85de..f7a4ea1742 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs @@ -2,12 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class MaxLengthAttributeAdapterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs similarity index 96% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs index 4a71399b93..2166805679 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs @@ -2,12 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class MinLengthAttributeAdapterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs index 82895fca04..f29b4be1f5 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs @@ -6,10 +6,13 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; +using Microsoft.AspNet.Mvc.Internal; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Testing; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { // Integration tests for the default provider configuration. public class ModelMetadataProviderTest diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs similarity index 90% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs index e6d1c0e658..a159d3ef97 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs @@ -2,10 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class NumericClientModelValidatorTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs index 2862f5134c..17421324c7 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Testing; using Microsoft.Extensions.Localization; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs similarity index 95% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs index 28b8d786a2..72d4944675 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs @@ -2,12 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class RequiredAttributeAdapterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs similarity index 96% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs index 2e07c8a4f0..e3e39d9a0f 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs @@ -2,12 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel.DataAnnotations; +using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Testing; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class StringLengthAttributeAdapterTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/TestModelNameProvider.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs similarity index 74% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/TestModelNameProvider.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs index e1fb875191..6fb5342298 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/TestModelNameProvider.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs @@ -1,9 +1,10 @@ // 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. -namespace Microsoft.AspNet.Mvc.ModelBinding -{ +using Microsoft.AspNet.Mvc.ModelBinding; +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal +{ public class TestModelNameProvider : IModelNameProvider { public string Name { get; set; } diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/TestResources.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/TestResources.cs similarity index 100% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/TestResources.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/TestResources.cs diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs similarity index 90% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs index df872abf5b..4403268b34 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs @@ -1,15 +1,16 @@ -using System; +// 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.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; using Moq; using Xunit; -namespace Microsoft.AspNet.Mvc.DataAnnotations.Test +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ValidationAttributeAdapterOfTAttributeTest { diff --git a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs similarity index 95% rename from test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs rename to test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs index 5829749938..6340d813dd 100644 --- a/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs @@ -2,12 +2,10 @@ // 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.ComponentModel.DataAnnotations; -using Microsoft.AspNet.Mvc.DataAnnotations; using Xunit; -namespace Microsoft.AspNet.Mvc.ModelBinding.Validation +namespace Microsoft.AspNet.Mvc.DataAnnotations.Internal { public class ValidationAttributeAdapterProviderTest { diff --git a/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonInputFormatterTest.cs index c2418f7ec1..9e7bdfe3cd 100644 --- a/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonInputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonInputFormatterTest.cs @@ -9,6 +9,7 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonPatchInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonPatchInputFormatterTest.cs index 19985d2f2b..727e214a76 100644 --- a/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonPatchInputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Formatters.Json.Test/JsonPatchInputFormatterTest.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.JsonPatch; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlDataContractSerializerInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlDataContractSerializerInputFormatterTest.cs index 9bf70ab092..f2517e65a6 100644 --- a/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlDataContractSerializerInputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlDataContractSerializerInputFormatterTest.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using System.Xml; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Testing; using Microsoft.AspNet.Testing.xunit; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlSerializerInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlSerializerInputFormatterTest.cs index 692531097c..8449c5e819 100644 --- a/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlSerializerInputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Formatters.Xml.Test/XmlSerializerInputFormatterTest.cs @@ -12,6 +12,7 @@ using System.Xml; using System.Xml.Serialization; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Testing; using Microsoft.AspNet.Testing.xunit; using Moq; diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/DefaultOrderTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/DefaultOrderTest.cs index 42824e5ea2..706ef9c372 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/DefaultOrderTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/DefaultOrderTest.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Filters; +using Microsoft.AspNet.Mvc.Internal; using Xunit; namespace Microsoft.AspNet.Mvc.FunctionalTests diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/RouteDataTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/RouteDataTest.cs index e5354bf9fc..e5e6010fd0 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/RouteDataTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/RouteDataTest.cs @@ -6,6 +6,7 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.Routing; using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing.Template; diff --git a/test/Microsoft.AspNet.Mvc.IntegrationTests/ModelBindingTestHelper.cs b/test/Microsoft.AspNet.Mvc.IntegrationTests/ModelBindingTestHelper.cs index 25b6d4fd20..10c5d29b09 100644 --- a/test/Microsoft.AspNet.Mvc.IntegrationTests/ModelBindingTestHelper.cs +++ b/test/Microsoft.AspNet.Mvc.IntegrationTests/ModelBindingTestHelper.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Controllers; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Routing; @@ -40,7 +41,7 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests }; } - public static DefaultControllerActionArgumentBinder GetArgumentBinder(MvcOptions options = null) + public static ControllerArgumentBinder GetArgumentBinder(MvcOptions options = null) { if (options == null) { @@ -54,9 +55,9 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests } } - public static DefaultControllerActionArgumentBinder GetArgumentBinder(IModelMetadataProvider metadataProvider) + public static ControllerArgumentBinder GetArgumentBinder(IModelMetadataProvider metadataProvider) { - return new DefaultControllerActionArgumentBinder( + return new ControllerArgumentBinder( metadataProvider, GetObjectValidator(metadataProvider)); } diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs index ca347bc352..a73f72edf9 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs @@ -11,6 +11,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.ModelBinding; +using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Microsoft.AspNet.Mvc.Razor.Internal; using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.ViewEngines; diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs index 5a9ea38ad7..1a17124b6c 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.ViewEngines; @@ -66,7 +67,7 @@ namespace Microsoft.AspNet.Mvc.Razor { var activator = new RazorPageActivator(new EmptyModelMetadataProvider()); var serviceProvider = new Mock(); - var typeActivator = new DefaultTypeActivatorCache(); + var typeActivator = new TypeActivatorCache(); var myService = new MyService(); serviceProvider.Setup(mock => mock.GetService(typeof(MyService))) .Returns(myService); diff --git a/test/Microsoft.AspNet.Mvc.Test/MvcOptionsSetupTest.cs b/test/Microsoft.AspNet.Mvc.Test/MvcOptionsSetupTest.cs index 10dac9c03d..1432af625d 100644 --- a/test/Microsoft.AspNet.Mvc.Test/MvcOptionsSetupTest.cs +++ b/test/Microsoft.AspNet.Mvc.Test/MvcOptionsSetupTest.cs @@ -9,6 +9,7 @@ using System.Xml; using System.Xml.Linq; using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; diff --git a/test/Microsoft.AspNet.Mvc.Test/MvcServiceCollectionExtensionsTest.cs b/test/Microsoft.AspNet.Mvc.Test/MvcServiceCollectionExtensionsTest.cs index 89920c6c60..44da4dfdf5 100644 --- a/test/Microsoft.AspNet.Mvc.Test/MvcServiceCollectionExtensionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.Test/MvcServiceCollectionExtensionsTest.cs @@ -11,6 +11,7 @@ using Microsoft.AspNet.Mvc.ApiExplorer; using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Cors; +using Microsoft.AspNet.Mvc.Cors.Internal; using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Formatters.Json.Internal; diff --git a/test/Microsoft.AspNet.Mvc.TestCommon/TestClientModelValidatorProvider.cs b/test/Microsoft.AspNet.Mvc.TestCommon/TestClientModelValidatorProvider.cs index 0c9989af5f..9a6b70bc76 100644 --- a/test/Microsoft.AspNet.Mvc.TestCommon/TestClientModelValidatorProvider.cs +++ b/test/Microsoft.AspNet.Mvc.TestCommon/TestClientModelValidatorProvider.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding.Validation { diff --git a/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpRequestStreamReaderFactory.cs b/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpRequestStreamReaderFactory.cs index 3bdfcc53e1..738ce64ef2 100644 --- a/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpRequestStreamReaderFactory.cs +++ b/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpRequestStreamReaderFactory.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc { diff --git a/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpResponseStreamWriterFactory.cs b/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpResponseStreamWriterFactory.cs index 4bb4cd05ab..5262cb6888 100644 --- a/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpResponseStreamWriterFactory.cs +++ b/test/Microsoft.AspNet.Mvc.TestCommon/TestHttpResponseStreamWriterFactory.cs @@ -3,7 +3,7 @@ using System.IO; using System.Text; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc { diff --git a/test/Microsoft.AspNet.Mvc.TestCommon/TestModelMetadataProvider.cs b/test/Microsoft.AspNet.Mvc.TestCommon/TestModelMetadataProvider.cs index ddb978c07f..bf65407570 100644 --- a/test/Microsoft.AspNet.Mvc.TestCommon/TestModelMetadataProvider.cs +++ b/test/Microsoft.AspNet.Mvc.TestCommon/TestModelMetadataProvider.cs @@ -4,6 +4,8 @@ using System; using System.Collections.Generic; using System.Reflection; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding.Metadata; using Xunit; diff --git a/test/Microsoft.AspNet.Mvc.TestCommon/TestModelValidatorProvider.cs b/test/Microsoft.AspNet.Mvc.TestCommon/TestModelValidatorProvider.cs index a44811030f..48502c0ef0 100644 --- a/test/Microsoft.AspNet.Mvc.TestCommon/TestModelValidatorProvider.cs +++ b/test/Microsoft.AspNet.Mvc.TestCommon/TestModelValidatorProvider.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding.Validation { diff --git a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ControllerTest.cs b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ControllerTest.cs index 55e031f80c..fd57f8228e 100644 --- a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ControllerTest.cs +++ b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ControllerTest.cs @@ -8,7 +8,10 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Internal; +using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.Filters; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.ViewFeatures; diff --git a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs index beefd9245d..f4511748ed 100644 --- a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs +++ b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs @@ -13,6 +13,7 @@ using Microsoft.AspNet.Antiforgery; using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.DataAnnotations; +using Microsoft.AspNet.Mvc.DataAnnotations.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding.Validation; using Microsoft.AspNet.Mvc.Routing; diff --git a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs index 96a9ff892f..82e98a7af7 100644 --- a/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs @@ -14,6 +14,7 @@ using Microsoft.AspNet.Http.Internal; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.TestCommon; @@ -522,7 +523,7 @@ namespace Microsoft.AspNet.Mvc services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(new FixedSetViewComponentDescriptorProvider(descriptors)); services.AddSingleton(); diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs index 4a9a6649aa..a4aadcf6c6 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs @@ -11,6 +11,7 @@ using Microsoft.AspNet.Mvc.ActionConstraints; using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.Controllers; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.WebApiCompatShim; using Microsoft.Extensions.Options; @@ -85,14 +86,14 @@ namespace System.Web.Http a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "GetAll")); Assert.Equal( new string[] { "GET" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); action = Assert.Single( actions, a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "")); Assert.Equal( new string[] { "GET" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); } [Fact] @@ -121,14 +122,14 @@ namespace System.Web.Http a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "Edit")); Assert.Equal( new string[] { "POST" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); action = Assert.Single( actions, a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "")); Assert.Equal( new string[] { "POST" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); } [Fact] @@ -157,14 +158,14 @@ namespace System.Web.Http a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "Delete")); Assert.Equal( new string[] { "PUT" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); action = Assert.Single( actions, a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "")); Assert.Equal( new string[] { "PUT" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); } // The method name is used to infer a verb, not the action name @@ -194,14 +195,14 @@ namespace System.Web.Http a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "GetOptions")); Assert.Equal( new string[] { "OPTIONS" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); action = Assert.Single( actions, a => a.RouteConstraints.Any(rc => rc.RouteKey == "action" && rc.RouteValue == "")); Assert.Equal( new string[] { "OPTIONS" }, - Assert.Single(action.ActionConstraints.OfType()).HttpMethods); + Assert.Single(action.ActionConstraints.OfType()).HttpMethods); } [Fact] diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs index 4b98921ae9..61ae55d466 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs @@ -16,6 +16,7 @@ using Microsoft.Extensions.Options; using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; +using Microsoft.AspNet.Mvc.Internal; namespace System.Web.Http { diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs index 06cbc574bd..bd723d0d5b 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs @@ -9,6 +9,7 @@ using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Testing; diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs index ed8b7c4294..e641e44c35 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs @@ -9,6 +9,7 @@ using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs index 693ee9884c..96a784ae46 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs @@ -9,6 +9,7 @@ using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc.Abstractions; using Microsoft.AspNet.Mvc.Formatters; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Testing; diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestHttpResponseStreamWriterFactory.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestHttpResponseStreamWriterFactory.cs index 4bb4cd05ab..3e9f9c0b62 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestHttpResponseStreamWriterFactory.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestHttpResponseStreamWriterFactory.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Internal; namespace Microsoft.AspNet.Mvc { diff --git a/test/WebSites/RoutingWebSite/HttpMergeAttribute.cs b/test/WebSites/RoutingWebSite/HttpMergeAttribute.cs index bd342ffe92..8975d2d6f6 100644 --- a/test/WebSites/RoutingWebSite/HttpMergeAttribute.cs +++ b/test/WebSites/RoutingWebSite/HttpMergeAttribute.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Mvc.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace RoutingWebSite { diff --git a/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs b/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs index 420f91091b..ad4a904ba1 100644 --- a/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionDeleteAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace VersioningWebSite { diff --git a/test/WebSites/VersioningWebSite/VersionGetAttribute.cs b/test/WebSites/VersioningWebSite/VersionGetAttribute.cs index 26f577c75e..18e31ce112 100644 --- a/test/WebSites/VersioningWebSite/VersionGetAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionGetAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace VersioningWebSite { diff --git a/test/WebSites/VersioningWebSite/VersionPostAttribute.cs b/test/WebSites/VersioningWebSite/VersionPostAttribute.cs index 6a29ba9863..8d805619b0 100644 --- a/test/WebSites/VersioningWebSite/VersionPostAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionPostAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace VersioningWebSite { diff --git a/test/WebSites/VersioningWebSite/VersionPutAttribute.cs b/test/WebSites/VersioningWebSite/VersionPutAttribute.cs index 071fe9fb67..d74f39f89a 100644 --- a/test/WebSites/VersioningWebSite/VersionPutAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionPutAttribute.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.Infrastructure; +using Microsoft.AspNet.Mvc.Routing; namespace VersioningWebSite {