From 8d66f104f7f2ca42ee8b21f75b0e2b3e1abe2e00 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 24 Oct 2018 12:44:11 -0700 Subject: [PATCH] Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal --- .../DefaultApiDescriptionProvider.cs | 2 +- .../ActionConstraintCache.cs | 5 +- .../DefaultActionConstraintProvider.cs | 7 +- .../HttpMethodActionConstraint.cs | 6 +- .../IConsumesActionConstraint.cs | 8 +- .../ApiDescriptionActionData.cs | 6 +- .../ActionAttributeRouteModel.cs | 5 +- .../ApiBehaviorApplicationModelProvider.cs | 1 - .../ApplicationModelConventions.cs | 5 +- .../AuthorizationApplicationModelProvider.cs | 5 +- ...onstraintForFormFileParameterConvention.cs | 2 +- .../ControllerActionDescriptorBuilder.cs | 7 +- .../ControllerActionDescriptorProvider.cs | 11 ++- .../DefaultApplicationModelProvider.cs | 19 +++-- .../InferParameterBindingInfoConvention.cs | 1 - .../Authorization/AuthorizeFilter.cs | 2 +- .../MvcApplicationBuilderExtensions.cs | 3 +- .../MvcEndpointRouteBuilderExtensions.cs | 6 +- .../ChallengeResult.cs | 1 - .../ConsumesAttribute.cs | 1 - .../ContentResult.cs | 1 - .../ControllerBase.cs | 1 - .../ControllerBinderDelegate.cs | 4 +- .../ControllerBinderDelegateProvider.cs | 4 +- .../Controllers/ControllerFactoryProvider.cs | 6 +- .../Controllers/DefaultControllerActivator.cs | 7 +- .../Controllers/DefaultControllerFactory.cs | 6 +- .../DefaultControllerPropertyActivator.cs | 5 +- .../IControllerPropertyActivatorFactory.cs | 3 +- .../ApiBehaviorOptionsSetup.cs | 5 +- .../MvcBuilder.cs | 7 +- .../MvcCoreBuilder.cs | 7 +- .../MvcCoreMvcCoreBuilderExtensions.cs | 1 - .../MvcCoreRouteOptionsSetup.cs | 4 +- .../MvcCoreServiceCollectionExtensions.cs | 1 - .../MvcMarkerService.cs | 8 +- .../DisableRequestSizeLimitAttribute.cs | 1 - .../FileContentResult.cs | 1 - .../FileStreamResult.cs | 1 - .../ControllerActionFilter.cs | 9 +-- .../ControllerResultFilter.cs | 7 +- .../DefaultFilterProvider.cs | 14 ++-- .../DisableRequestSizeLimitFilter.cs | 9 +-- .../{Internal => Filters}/FilterCursor.cs | 6 +- .../{Internal => Filters}/FilterCursorItem.cs | 4 +- .../FilterDescriptorOrderComparer.cs | 4 +- .../{Internal => Filters}/FilterFactory.cs | 5 +- .../FilterFactoryResult.cs | 6 +- .../IMiddlewareFilterFeature.cs | 8 +- .../IResponseCacheFilter.cs | 8 +- .../{Internal => Filters}/MiddlewareFilter.cs | 2 +- .../Filters/MiddlewareFilterAttribute.cs | 1 - .../MiddlewareFilterBuilder.cs | 4 +- .../MiddlewareFilterBuilderStartupFilter.cs | 4 +- .../MiddlewareFilterConfigurationProvider.cs | 4 +- .../MiddlewareFilterFeature.cs | 6 +- .../RequestFormLimitsFilter.cs | 5 +- .../RequestSizeLimitFilter.cs | 9 +-- .../ResponseCacheFilter.cs | 7 +- .../ResponseCacheFilterExecutor.cs | 6 +- .../ForbidResult.cs | 1 - .../AcceptHeaderParser.cs | 6 +- .../Formatters/FormatFilter.cs | 2 - .../HttpParseResult.cs | 4 +- .../HttpTokenParsingRules.cs | 4 +- .../{Internal => Formatters}/IFormatFilter.cs | 6 +- .../Formatters/MediaType.cs | 3 - .../MediaTypeSegmentWithQuality.cs | 2 +- .../ResponseContentTypeHelper.cs | 5 +- .../ActionInvokerFactory.cs | 5 +- .../ActionMethodExecutor.cs | 2 +- .../ActionResultTypeMapper.cs | 7 +- .../ActionSelector.cs | 6 +- .../AmbiguousActionException.cs | 4 +- .../Infrastructure/ClientErrorResultFilter.cs | 1 - .../Infrastructure/ContentResultExecutor.cs | 9 +-- .../ControllerActionInvoker.cs | 5 +- .../ControllerActionInvokerCache.cs | 4 +- .../ControllerActionInvokerCacheEntry.cs | 5 +- .../ControllerActionInvokerProvider.cs | 5 +- .../CopyOnWriteList.cs | 8 +- .../DefaultOutputFormatterSelector.cs | 2 - .../FileContentResultExecutor.cs | 1 - .../Infrastructure/FileResultExecutorBase.cs | 1 - .../FileStreamResultExecutor.cs | 1 - .../Infrastructure/IActionSelector.cs | 2 +- .../ITypeActivatorCache.cs | 6 +- .../LocalRedirectResultExecutor.cs | 1 - ...emoryPoolHttpRequestStreamReaderFactory.cs | 5 +- ...moryPoolHttpResponseStreamWriterFactory.cs | 5 +- .../Infrastructure/ModelStateInvalidFilter.cs | 1 - .../ModelStateInvalidFilterFactory.cs | 2 +- .../Infrastructure/MvcCoreMvcOptionsSetup.cs | 1 - .../NonDisposableStream.cs | 6 +- .../Infrastructure/ObjectResultExecutor.cs | 1 - .../ParameterDefaultValues.cs | 4 +- .../PhysicalFileResultExecutor.cs | 1 - .../Infrastructure/RedirectResultExecutor.cs | 1 - .../RedirectToActionResultExecutor.cs | 1 - .../RedirectToPageResultExecutor.cs | 1 - .../RedirectToRouteResultExecutor.cs | 1 - .../ResourceInvoker.cs | 7 +- .../TypeActivatorCache.cs | 8 +- .../VirtualFileResultExecutor.cs | 1 - .../LocalRedirectResult.cs | 1 - .../ModelBinding/Binders/BodyModelBinder.cs | 1 - .../Binders/ByteArrayModelBinder.cs | 1 - .../Binders/CollectionModelBinder.cs | 2 - .../Binders/ComplexTypeModelBinder.cs | 1 - .../Binders/DecimalModelBinder.cs | 1 - .../Binders/DictionaryModelBinder.cs | 2 - .../ModelBinding/Binders/DoubleModelBinder.cs | 1 - .../ModelBinding/Binders/FloatModelBinder.cs | 1 - .../Binders/FormCollectionModelBinder.cs | 1 - .../Binders/FormFileModelBinder.cs | 2 - .../ModelBinding/Binders/HeaderModelBinder.cs | 2 - .../Binders/HeaderModelBinderProvider.cs | 1 - .../Binders/KeyValuePairModelBinder.cs | 2 - .../Binders/SimpleTypeModelBinder.cs | 1 - .../DefaultModelBindingContext.cs | 0 .../DefaultPropertyFilterProvider.cs | 1 - .../ElementalValueProvider.cs | 5 +- .../EmptyModelMetadataProvider.cs | 1 - .../ModelBinding/FormValueProvider.cs | 3 - .../ModelBinding/JQueryValueProvider.cs | 6 +- .../DefaultBindingMetadataProvider.cs | 8 +- ...DefaultCompositeMetadataDetailsProvider.cs | 13 ++-- .../DefaultValidationMetadataProvider.cs | 7 +- .../ModelBinding/ModelBinderFactory.cs | 1 - .../{Internal => }/ModelBindingHelper.cs | 4 +- .../{Internal => ModelBinding}/NoOpBinder.cs | 5 +- .../ModelBinding/ObjectModelValidator.cs | 3 - .../ModelBinding/ParameterBinder.cs | 1 - .../PlaceholderBinder.cs | 5 +- .../PrefixContainer.cs | 2 +- .../PropertyValueSetter.cs | 8 +- .../ModelBinding/QueryStringValueProvider.cs | 3 - .../ReferenceEqualityComparer.cs | 4 +- .../ModelBinding/RouteValueProvider.cs | 3 - .../Validation}/ClientValidatorCache.cs | 4 +- .../DefaultCollectionValidationStrategy.cs | 22 +++--- .../DefaultComplexObjectValidationStrategy.cs | 6 +- .../DefaultModelValidatorProvider.cs | 4 +- .../Validation}/DefaultObjectValidator.cs | 5 +- ...plicitIndexCollectionValidationStrategy.cs | 14 ++-- .../ShortFormDictionaryValidationStrategy.cs | 4 +- .../ValidationStack.cs | 3 +- .../Validation/ValidationVisitor.cs | 9 +-- .../Validation}/ValidatorCache.cs | 7 +- .../MvcCoreDiagnosticSourceExtensions.cs | 4 +- .../{Internal => }/MvcCoreLoggerExtensions.cs | 3 +- .../PhysicalFileResult.cs | 1 - .../ProducesAttribute.cs | 1 - .../Properties/AssemblyInfo.cs | 2 + .../RedirectResult.cs | 1 - .../RedirectToActionResult.cs | 1 - .../RedirectToPageResult.cs | 1 - .../RedirectToRouteResult.cs | 1 - .../RequestFormLimitsAttribute.cs | 1 - .../RequestSizeLimitAttribute.cs | 1 - .../ResponseCacheAttribute.cs | 1 - .../Routing/ActionConstraintMatcherPolicy.cs | 3 +- .../{Internal => Routing}/AttributeRoute.cs | 4 +- .../{Internal => Routing}/AttributeRouting.cs | 6 +- .../MvcAttributeRouteHandler.cs | 6 +- .../MvcEndpointDataSource.cs | 9 ++- .../MvcEndpointInvokerFactory.cs | 4 +- .../{Internal => Routing}/MvcRouteHandler.cs | 6 +- .../NormalizedRouteValue.cs | 4 +- .../{Internal => Routing}/NullRouter.cs | 4 +- .../RoutePatternWriter.cs | 5 +- .../Routing/UrlHelperBase.cs | 1 - .../{Internal => Routing}/ViewEnginePath.cs | 6 +- .../SignInResult.cs | 1 - .../SignOutResult.cs | 1 - .../StatusCodeResult.cs | 1 - .../VirtualFileResult.cs | 1 - .../breakingchanges.netcore.json | 75 ++++++++++++++++++- .../Internal/CorsApplicationModelProvider.cs | 2 +- .../CorsHttpMethodActionConstraint.cs | 6 +- .../Properties/AssemblyInfo.cs | 2 + .../Internal/JsonResultExecutor.cs | 1 - ...XmlDataContractSerializerInputFormatter.cs | 2 +- .../XmlSerializerInputFormatter.cs | 2 +- .../DefaultTagHelperActivator.cs | 8 +- .../LanguageViewLocationExpander.cs | 4 +- .../RazorViewEngine.cs | 2 +- ...azorPagesEndpointRouteBuilderExtensions.cs | 7 +- .../Internal/PageActionInvoker.cs | 2 +- .../PageBase.cs | 1 - .../PageModel.cs | 1 - ...MvcViewFeaturesMvcCoreBuilderExtensions.cs | 2 +- .../TempDataApplicationModelProvider.cs | 1 - ...ewDataAttributeApplicationModelProvider.cs | 1 - .../Properties/AssemblyInfo.cs | 2 + .../RemoteAttribute.cs | 1 - .../DefaultViewComponentActivator.cs | 9 +-- .../ViewComponentInvokerCache.cs | 5 +- .../ViewFeatures/DefaultHtmlGenerator.cs | 1 - .../DefaultValidationHtmlAttributeProvider.cs | 3 - .../ViewComponentResultExecutor.cs | 2 +- ...taDictionaryControllerPropertyActivator.cs | 1 - .../ViewFeatures/ViewExecutor.cs | 2 +- .../breakingchanges.netcore.json | 16 ++++ ...onConventionsApplicationModelConvention.cs | 2 +- ...oft.AspNetCore.Mvc.WebApiCompatShim.csproj | 1 - .../ModelBinding/ModelStateDictionaryTest.cs | 1 - .../ApiResponseTypeProviderTest.cs | 2 +- .../DefaultApiDescriptionProviderTest.cs | 2 +- .../AcceptedAtActionResultTests.cs | 3 - .../AcceptedResultTests.cs | 4 - .../ActionConstraintCacheTest.cs | 3 +- .../HttpMethodActionConstraintTest.cs | 3 +- .../ApplicationModels/ActionModelTest.cs | 2 +- ...ApiBehaviorApplicationModelProviderTest.cs | 1 - ...thorizationApplicationModelProviderTest.cs | 3 +- ...raintForFormFileParameterConventionTest.cs | 1 - .../ControllerActionDescriptorBuilderTest.cs | 2 +- ...ControllerActionDescriptorProviderTests.cs | 6 +- .../ApplicationModels/ControllerModelTest.cs | 2 - .../DefaultApplicationModelProviderTest.cs | 29 +------ ...InferParameterBindingInfoConventionTest.cs | 1 - .../MvcApplicationBuilderExtensionsTest.cs | 2 +- .../ConsumesAttributeTests.cs | 3 +- .../ContentResultTest.cs | 1 - .../ControllerBaseTest.cs | 2 - .../ControllerActivatorProviderTest.cs | 2 +- .../ControllerBinderDelegateProviderTest.cs | 2 +- .../ControllerFactoryProviderTest.cs | 1 - .../DefaultControllerActivatorTest.cs | 2 +- .../DefaultControllerFactoryTest.cs | 2 +- .../CreatedAtActionResultTests.cs | 1 - .../CreatedAtRouteResultTests.cs | 1 - .../CreatedResultTests.cs | 1 - .../ApiBehaviorOptionsSetupTest.cs | 14 ++-- ...pplicationModelConventionExtensionsTest.cs | 1 - .../MvcBuilderExtensionsTest.cs | 2 - .../MvcCoreBuilderExtensionsTest.cs | 1 - .../MvcCoreServiceCollectionExtensionsTest.cs | 1 - .../DisableRequestSizeLimitFilterTest.cs | 4 +- .../FilterFactoryTest.cs | 3 +- .../FilterProviderTest.cs | 3 +- .../Filters/MiddlewareFilterAttributeTest.cs | 2 +- .../MiddlewareFilterBuilderTest.cs | 2 +- ...ddlewareFilterConfigurationProviderTest.cs | 2 +- .../MiddlewareFilterTest.cs | 3 +- .../RequestFormLimitsFilterTest.cs | 3 +- .../RequestSizeLimitFilterTest.cs | 3 +- .../ResponseCacheFilterExecutorTest.cs | 4 +- .../AcceptHeaderParserTest.cs | 3 +- .../ResponseContentTypeHelperTest.cs | 2 +- .../HttpNotFoundObjectResultTest.cs | 1 - .../HttpOkObjectResultTest.cs | 1 - .../ActionMethodExecutorTest.cs | 4 +- .../ActionResultTypeMapperTest.cs | 3 +- .../ActionSelectorTest.cs | 2 +- .../ControllerActionInvokerCacheTest.cs | 4 +- .../ControllerActionInvokerTest.cs | 6 +- .../NonDisposableStreamTest.cs | 3 +- .../ParameterDefaultValuesTest.cs | 2 +- .../Binders/ArrayModelBinderTest.cs | 1 - .../Binders/BinderTypeModelBinderTest.cs | 1 - .../Binders/CollectionModelBinderTest.cs | 2 - .../Binders/ComplexTypeModelBinderTest.cs | 1 - .../Binders/DictionaryModelBinderTest.cs | 1 - .../Binders/HeaderModelBinderTests.cs | 1 - .../CompositeValueProviderTest.cs | 1 - .../ElementalValueProviderTests.cs | 9 +-- .../DefaultBindingMetadataProviderTest.cs | 6 +- .../Metadata/DefaultModelMetadataTest.cs | 1 - .../DefaultValidationMetadataProviderTest.cs | 1 - .../EmptyCompositeMetadataDetailsProvider.cs | 4 +- .../ModelBinding/ModelBinderFactoryTest.cs | 1 - .../ModelBinding/ModelBindingHelperTest.cs | 3 - .../ModelBinding/ParameterBinderTest.cs | 1 - .../PrefixContainerTest.cs | 2 +- .../ReferenceEqualityComparerTest.cs | 2 +- .../ModelBinding/StubModelBinder.cs | 1 - .../Validation}/ClientValidatorCacheTest.cs | 4 +- ...DefaultCollectionValidationStrategyTest.cs | 6 +- ...aultComplexObjectValidationStrategyTest.cs | 4 +- .../DefaultObjectValidatorTests.cs | 4 +- ...itIndexCollectionValidationStrategyTest.cs | 4 +- ...ortFormDictionaryValidationStrategyTest.cs | 4 +- .../ValidationStackTest.cs | 2 +- .../Validation}/ValidatorCacheTest.cs | 4 +- .../MvcCoreLoggerExtensionsTest.cs | 2 +- .../ProducesAttributeTests.cs | 4 +- .../RedirectToActionResultTest.cs | 1 - .../RedirectToRouteResultTest.cs | 1 - .../ResponseCacheAttributeTest.cs | 1 - .../AttributeRouteTest.cs | 3 +- .../AttributeRoutingTest.cs | 3 +- .../Routing/KnownRouteValueConstraintTests.cs | 1 - .../MvcEndpointDataSourceTests.cs | 9 +-- .../MvcRouteHandlerTests.cs | 4 +- .../RoutePatternWriterTests.cs | 3 +- .../ViewEnginePathTest.cs | 2 +- .../CommonResourceInvokerTest.cs | 6 +- .../SimpleValueProviderFactory.cs | 1 - .../TestModelBinderFactory.cs | 1 - .../TestModelMetadataProvider.cs | 1 - .../CorsApplicationModelProviderTest.cs | 2 +- .../CorsHttpMethodActionConstraintTest.cs | 1 - .../Internal/ModelMetadataProviderTest.cs | 1 - .../DefaultOrderTest.cs | 8 +- .../RoutingTests.cs | 7 +- .../TryUpdateModelIntegrationTest.cs | 2 - .../MvcRazorMvcBuilderExtensionsTest.cs | 1 - .../MvcRazorMvcCoreBuilderExtensionsTest.cs | 1 - .../DefaultTagHelperActivatorTest.cs | 7 +- .../Internal/DefaultTagHelperFactoryTest.cs | 1 - .../RazorPageCreateTagHelperTest.cs | 5 +- .../RazorViewEngineOptionsTest.cs | 2 - .../Internal/PageActionInvokerTest.cs | 2 +- .../Internal/DefaultTagHelperActivatorTest.cs | 2 +- .../TestableHtmlGenerator.cs | 2 +- .../MvcServiceCollectionExtensionsTest.cs | 1 - .../ActionConstraintMatcherPolicyTest.cs | 3 +- .../ControllerTest.cs | 3 +- ...MvcViewFeaturesMvcBuilderExtensionsTest.cs | 1 - .../Internal/FormatWeekHelperTest.cs | 1 - .../TempDataApplicationModelProviderTest.cs | 1 - ...taAttributeApplicationModelProviderTest.cs | 1 - .../ViewComponentResultTest.cs | 1 - .../DefaultViewComponentActivatorTests.cs | 2 +- .../ViewFeatures/DefaultHtmlGeneratorTest.cs | 2 +- ...aultValidationHtmlAttributeProviderTest.cs | 2 +- .../HtmlGeneratorUtilities.cs | 2 +- .../ApiControllerActionDiscoveryTest.cs | 2 - .../BadRequestErrorMessageResultTest.cs | 1 - .../ExceptionResultTest.cs | 1 - .../InvalidModelStateResultTest.cs | 1 - .../NegotiatedContentResultTest.cs | 1 - .../Controllers/OrderController.cs | 2 +- 335 files changed, 483 insertions(+), 750 deletions(-) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ActionConstraints}/ActionConstraintCache.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ActionConstraints}/DefaultActionConstraintProvider.cs (91%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ActionConstraints}/HttpMethodActionConstraint.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ActionConstraints}/IConsumesActionConstraint.cs (69%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApiExplorer}/ApiDescriptionActionData.cs (86%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/ActionAttributeRouteModel.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/ApplicationModelConventions.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/AuthorizationApplicationModelProvider.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/ControllerActionDescriptorBuilder.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/ControllerActionDescriptorProvider.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ApplicationModels}/DefaultApplicationModelProvider.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Controllers}/ControllerBinderDelegate.cs (78%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Controllers}/ControllerBinderDelegateProvider.cs (98%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Controllers}/DefaultControllerPropertyActivator.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Controllers}/IControllerPropertyActivatorFactory.cs (82%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => DependencyInjection}/ApiBehaviorOptionsSetup.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => DependencyInjection}/MvcBuilder.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => DependencyInjection}/MvcCoreBuilder.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => DependencyInjection}/MvcCoreRouteOptionsSetup.cs (87%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => DependencyInjection}/MvcMarkerService.cs (74%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/ControllerActionFilter.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/ControllerResultFilter.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/DefaultFilterProvider.cs (84%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/DisableRequestSizeLimitFilter.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/FilterCursor.cs (93%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/FilterCursorItem.cs (79%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/FilterDescriptorOrderComparer.cs (88%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/FilterFactory.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/FilterFactoryResult.cs (79%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/IMiddlewareFilterFeature.cs (83%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/IResponseCacheFilter.cs (67%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/MiddlewareFilter.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/MiddlewareFilterBuilder.cs (98%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/MiddlewareFilterBuilderStartupFilter.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/MiddlewareFilterConfigurationProvider.cs (98%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/MiddlewareFilterFeature.cs (69%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/RequestFormLimitsFilter.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/RequestSizeLimitFilter.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/ResponseCacheFilter.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Filters}/ResponseCacheFilterExecutor.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/AcceptHeaderParser.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/HttpParseResult.cs (73%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/HttpTokenParsingRules.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/IFormatFilter.cs (87%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/MediaTypeSegmentWithQuality.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Formatters}/ResponseContentTypeHelper.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ActionInvokerFactory.cs (87%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ActionMethodExecutor.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ActionResultTypeMapper.cs (84%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ActionSelector.cs (98%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/AmbiguousActionException.cs (83%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ControllerActionInvoker.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ControllerActionInvokerCache.cs (98%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ControllerActionInvokerCacheEntry.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ControllerActionInvokerProvider.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/CopyOnWriteList.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ITypeActivatorCache.cs (90%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/MemoryPoolHttpRequestStreamReaderFactory.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/MemoryPoolHttpResponseStreamWriterFactory.cs (93%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/NonDisposableStream.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ParameterDefaultValues.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/ResourceInvoker.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Infrastructure}/TypeActivatorCache.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/DefaultModelBindingContext.cs (100%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/ElementalValueProvider.cs (87%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Metadata}/DefaultBindingMetadataProvider.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Metadata}/DefaultCompositeMetadataDetailsProvider.cs (80%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Metadata}/DefaultValidationMetadataProvider.cs (93%) rename src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/{Internal => }/ModelBindingHelper.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/NoOpBinder.cs (76%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/PlaceholderBinder.cs (84%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/PrefixContainer.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/PropertyValueSetter.cs (89%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding}/ReferenceEqualityComparer.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/ClientValidatorCache.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/DefaultCollectionValidationStrategy.cs (93%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/DefaultComplexObjectValidationStrategy.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{ => ModelBinding/Validation}/DefaultObjectValidator.cs (91%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/ExplicitIndexCollectionValidationStrategy.cs (92%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/ShortFormDictionaryValidationStrategy.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/{Internal => Validation}/ValidationStack.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => ModelBinding/Validation}/ValidatorCache.cs (94%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => }/MvcCoreDiagnosticSourceExtensions.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => }/MvcCoreLoggerExtensions.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/AttributeRoute.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/AttributeRouting.cs (91%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/MvcAttributeRouteHandler.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/MvcEndpointDataSource.cs (99%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/MvcEndpointInvokerFactory.cs (96%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/MvcRouteHandler.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/NormalizedRouteValue.cs (95%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/NullRouter.cs (93%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/RoutePatternWriter.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Core/{Internal => Routing}/ViewEnginePath.cs (97%) rename src/Microsoft.AspNetCore.Mvc.Razor/{Internal => Infrastructure}/DefaultTagHelperActivator.cs (89%) create mode 100644 src/Microsoft.AspNetCore.Mvc.ViewFeatures/breakingchanges.netcore.json rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ActionConstraints}/ActionConstraintCacheTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ActionConstraints}/HttpMethodActionConstraintTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ApplicationModels}/AuthorizationApplicationModelProviderTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ApplicationModels}/ControllerActionDescriptorBuilderTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ApplicationModels}/ControllerActionDescriptorProviderTests.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ApplicationModels}/DefaultApplicationModelProviderTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Controllers}/ControllerBinderDelegateProviderTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => DependencyInjection}/ApiBehaviorOptionsSetupTest.cs (90%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/DisableRequestSizeLimitFilterTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/FilterFactoryTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/FilterProviderTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/MiddlewareFilterBuilderTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/MiddlewareFilterConfigurationProviderTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/MiddlewareFilterTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/RequestFormLimitsFilterTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/RequestSizeLimitFilterTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Filters}/ResponseCacheFilterExecutorTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Formatters}/AcceptHeaderParserTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Formatters}/ResponseContentTypeHelperTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ActionMethodExecutorTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ActionResultTypeMapperTest.cs (95%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ActionSelectorTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ControllerActionInvokerCacheTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ControllerActionInvokerTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{ => Infrastructure}/NonDisposableStreamTest.cs (95%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Infrastructure}/ParameterDefaultValuesTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding}/ElementalValueProviderTests.cs (92%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Metadata}/DefaultBindingMetadataProviderTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding}/PrefixContainerTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding}/ReferenceEqualityComparerTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/ClientValidatorCacheTest.cs (96%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/DefaultCollectionValidationStrategyTest.cs (96%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/DefaultComplexObjectValidationStrategyTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/DefaultObjectValidatorTests.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/ExplicitIndexCollectionValidationStrategyTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/ShortFormDictionaryValidationStrategyTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/{Internal => Validation}/ValidationStackTest.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => ModelBinding/Validation}/ValidatorCacheTest.cs (96%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => }/MvcCoreLoggerExtensionsTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Routing}/AttributeRouteTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Routing}/AttributeRoutingTest.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Routing}/MvcEndpointDataSourceTests.cs (99%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Infrastructure => Routing}/MvcRouteHandlerTests.cs (98%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Routing}/RoutePatternWriterTests.cs (92%) rename test/Microsoft.AspNetCore.Mvc.Core.Test/{Internal => Routing}/ViewEnginePathTest.cs (97%) rename test/Microsoft.AspNetCore.Mvc.Razor.Test/{Internal => Infrastructure}/DefaultTagHelperActivatorTest.cs (93%) diff --git a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs index 6fd8c7e65f..d79f2f148d 100644 --- a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs @@ -5,10 +5,10 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc.Abstractions; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Template; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionConstraintCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/ActionConstraintCache.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionConstraintCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/ActionConstraintCache.cs index 384d48bffa..238fbfba82 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionConstraintCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/ActionConstraintCache.cs @@ -7,12 +7,11 @@ using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Infrastructure; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { - public class ActionConstraintCache + internal class ActionConstraintCache { private readonly IActionDescriptorCollectionProvider _collectionProvider; private readonly IActionConstraintProvider[] _actionConstraintProviders; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultActionConstraintProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs similarity index 91% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultActionConstraintProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs index 571f3ebebf..fe44d25be7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultActionConstraintProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs @@ -2,9 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Mvc.ActionConstraints; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { /// /// A default implementation of . @@ -14,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// implements or /// / /// - public class DefaultActionConstraintProvider : IActionConstraintProvider + internal class DefaultActionConstraintProvider : IActionConstraintProvider { /// public int Order => -1000; @@ -61,4 +60,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpMethodActionConstraint.cs b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/HttpMethodActionConstraint.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpMethodActionConstraint.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/HttpMethodActionConstraint.cs index e310493486..4385e734e5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpMethodActionConstraint.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/HttpMethodActionConstraint.cs @@ -4,12 +4,10 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { - public class HttpMethodActionConstraint : IActionConstraint + internal class HttpMethodActionConstraint : IActionConstraint { public static readonly int HttpMethodConstraintOrder = 100; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs similarity index 69% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs index b004cbdcf3..9e368fe825 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ActionConstraints/IConsumesActionConstraint.cs @@ -1,15 +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 Microsoft.AspNetCore.Mvc.ActionConstraints; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { /// /// An constraint that identifies a type which can be used to select an action /// based on incoming request. /// - public interface IConsumesActionConstraint : IActionConstraint + internal interface IConsumesActionConstraint : IActionConstraint { } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiDescriptionActionData.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs similarity index 86% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiDescriptionActionData.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs index 1a24b3d8bd..bba3427bd7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiDescriptionActionData.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/ApiDescriptionActionData.cs @@ -1,13 +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. -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc { /// /// Represents data used to build an ApiDescription, stored as part of the /// . /// - public class ApiDescriptionActionData + internal class ApiDescriptionActionData { /// /// The ApiDescription.GroupName of ApiDescription objects for the associated @@ -15,4 +15,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// public string GroupName { get; set; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionAttributeRouteModel.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ActionAttributeRouteModel.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionAttributeRouteModel.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ActionAttributeRouteModel.cs index 45fe4b2578..dc81fd4a3c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionAttributeRouteModel.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ActionAttributeRouteModel.cs @@ -3,11 +3,10 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ApplicationModels; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { - public static class ActionAttributeRouteModel + internal static class ActionAttributeRouteModel { public static IEnumerable<(AttributeRouteModel route, SelectorModel actionSelector, SelectorModel controllerSelector)> GetAttributeRoutes(ActionModel actionModel) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApiBehaviorApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApiBehaviorApplicationModelProvider.cs index 35a415297b..d987344e85 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApiBehaviorApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApiBehaviorApplicationModelProvider.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApplicationModelConventions.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ApplicationModelConventions.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs index 108890f5ce..6bd39d3391 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApplicationModelConventions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs @@ -4,14 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ApplicationModels; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { /// /// Applies conventions to a . /// - public static class ApplicationModelConventions + internal static class ApplicationModelConventions { /// /// Applies conventions to a . diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs index 3166c9deb0..34c7a31dd4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AuthorizationApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/AuthorizationApplicationModelProvider.cs @@ -5,12 +5,11 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Authorization; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { - public class AuthorizationApplicationModelProvider : IApplicationModelProvider + internal class AuthorizationApplicationModelProvider : IApplicationModelProvider { private readonly IAuthorizationPolicyProvider _policyProvider; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs index 714856e11d..6ad528161b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs @@ -3,7 +3,7 @@ using System; using System.Linq; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Microsoft.AspNetCore.Mvc.ApplicationModels diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorBuilder.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorBuilder.cs index 21ec3aee6b..47cc495378 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorBuilder.cs @@ -8,19 +8,18 @@ using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { /// /// Creates instances of from . /// - public static class ControllerActionDescriptorBuilder + internal static class ControllerActionDescriptorBuilder { // This is the default order for attribute routes whose order calculated from // the controller model is null. @@ -634,4 +633,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorProvider.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorProvider.cs index c5fc31e178..882139a62d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/ControllerActionDescriptorProvider.cs @@ -6,14 +6,13 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { - public class ControllerActionDescriptorProvider : IActionDescriptorProvider + internal class ControllerActionDescriptorProvider : IActionDescriptorProvider { private readonly ApplicationPartManager _partManager; private readonly IApplicationModelProvider[] _applicationModelProviders; @@ -63,7 +62,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// public void OnProvidersExecuted(ActionDescriptorProviderContext context) { - // After all of the providers have run, we need to provide a 'null' for each all of route values that + // After all of the providers have run, we need to provide a 'null' for each all of route values that // participate in action selection. // // This is important for scenarios like Razor Pages, that use the 'page' route value. An action that @@ -95,14 +94,14 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } - protected internal IEnumerable GetDescriptors() + internal IEnumerable GetDescriptors() { var applicationModel = BuildModel(); ApplicationModelConventions.ApplyConventions(applicationModel, _conventions); return ControllerActionDescriptorBuilder.Build(applicationModel); } - protected internal ApplicationModel BuildModel() + internal ApplicationModel BuildModel() { var controllerTypes = GetControllerTypes(); var context = new ApplicationModelProviderContext(controllerTypes); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultApplicationModelProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs index c79b2b209d..b1b23d9a93 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/DefaultApplicationModelProvider.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Routing; @@ -15,9 +14,9 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { - public class DefaultApplicationModelProvider : IApplicationModelProvider + internal class DefaultApplicationModelProvider : IApplicationModelProvider { private readonly MvcOptions _mvcOptions; private readonly IModelMetadataProvider _modelMetadataProvider; @@ -39,7 +38,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal public int Order => -1000; /// - public virtual void OnProvidersExecuting(ApplicationModelProviderContext context) + public void OnProvidersExecuting(ApplicationModelProviderContext context) { if (context == null) { @@ -98,7 +97,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } /// - public virtual void OnProvidersExecuted(ApplicationModelProviderContext context) + public void OnProvidersExecuted(ApplicationModelProviderContext context) { // Intentionally empty. } @@ -108,7 +107,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// The . /// A for the given . - protected virtual ControllerModel CreateControllerModel(TypeInfo typeInfo) + internal ControllerModel CreateControllerModel(TypeInfo typeInfo) { if (typeInfo == null) { @@ -215,7 +214,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// The . /// A for the given . - protected virtual PropertyModel CreatePropertyModel(PropertyInfo propertyInfo) + internal PropertyModel CreatePropertyModel(PropertyInfo propertyInfo) { if (propertyInfo == null) { @@ -263,7 +262,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// An instance for the given action or /// null if the does not represent an action. /// - protected virtual ActionModel CreateActionModel( + internal ActionModel CreateActionModel( TypeInfo typeInfo, MethodInfo methodInfo) { @@ -381,7 +380,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// Override this method to provide custom logic to determine which methods are considered actions. /// - protected virtual bool IsAction(TypeInfo typeInfo, MethodInfo methodInfo) + internal bool IsAction(TypeInfo typeInfo, MethodInfo methodInfo) { if (typeInfo == null) { @@ -445,7 +444,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// The . /// A for the given . - protected virtual ParameterModel CreateParameterModel(ParameterInfo parameterInfo) + internal ParameterModel CreateParameterModel(ParameterInfo parameterInfo) { if (parameterInfo == null) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/InferParameterBindingInfoConvention.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/InferParameterBindingInfoConvention.cs index 9a3839308a..edfd9a5e0b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/InferParameterBindingInfoConvention.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApplicationModels/InferParameterBindingInfoConvention.cs @@ -3,7 +3,6 @@ using System; using System.Linq; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing.Template; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Authorization/AuthorizeFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Authorization/AuthorizeFilter.cs index 29cf7cc085..df87c8d9f0 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Authorization/AuthorizeFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Authorization/AuthorizeFilter.cs @@ -8,9 +8,9 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; +using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs index 6cde8eccd5..2d873de87c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs @@ -4,10 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcEndpointRouteBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcEndpointRouteBuilderExtensions.cs index a3bd2d9951..a4d392a3b5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcEndpointRouteBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcEndpointRouteBuilderExtensions.cs @@ -1,14 +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. -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ChallengeResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/ChallengeResult.cs index 7f7f0249ca..a0bcd94b00 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ChallengeResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ChallengeResult.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs index 30a103a531..6893124313 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Net.Http.Headers; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ContentResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/ContentResult.cs index 29c9ddab2d..6fd602d5c3 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ContentResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ContentResult.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ControllerBase.cs b/src/Microsoft.AspNetCore.Mvc.Core/ControllerBase.cs index 3cc780746a..22078bb2a5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ControllerBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ControllerBase.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegate.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegate.cs similarity index 78% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegate.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegate.cs index 6a986160f0..dcfbe994f8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegate.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegate.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Controllers { - public delegate Task ControllerBinderDelegate( + internal delegate Task ControllerBinderDelegate( ControllerContext controllerContext, object controller, Dictionary arguments); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegateProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegateProvider.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegateProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegateProvider.cs index 20d600281e..bceb513944 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerBinderDelegateProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerBinderDelegateProvider.cs @@ -7,10 +7,10 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.ModelBinding; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Controllers { // Note: changes made to binding behavior in type should also be made to PageBinderFactory. - public static class ControllerBinderDelegateProvider + internal static class ControllerBinderDelegateProvider { public static ControllerBinderDelegate CreateBinderDelegate( ParameterBinder parameterBinder, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerFactoryProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerFactoryProvider.cs index 8b70db1f79..e321d73921 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerFactoryProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/ControllerFactoryProvider.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.Controllers { @@ -19,10 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.Controllers public ControllerFactoryProvider( IControllerActivatorProvider activatorProvider, IControllerFactory controllerFactory, -#pragma warning disable PUB0001 // Pubternal type in public API - IEnumerable propertyActivators -#pragma warning restore PUB0001 - ) + IEnumerable propertyActivators) { if (activatorProvider == null) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerActivator.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerActivator.cs index 9de77f768c..c03fe8ef85 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerActivator.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; namespace Microsoft.AspNetCore.Mvc.Controllers { @@ -18,9 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.Controllers /// Creates a new . /// /// The . -#pragma warning disable PUB0001 // Pubternal type in public API public DefaultControllerActivator(ITypeActivatorCache typeActivatorCache) -#pragma warning restore PUB0001 { if (typeActivatorCache == null) { @@ -71,8 +69,7 @@ namespace Microsoft.AspNetCore.Mvc.Controllers throw new ArgumentNullException(nameof(controller)); } - var disposable = controller as IDisposable; - if (disposable != null) + if (controller is IDisposable disposable) { disposable.Dispose(); } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerFactory.cs index 8c10083810..dfa6c5c95a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerFactory.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.Controllers { @@ -29,10 +28,7 @@ namespace Microsoft.AspNetCore.Mvc.Controllers /// public DefaultControllerFactory( IControllerActivator controllerActivator, -#pragma warning disable PUB0001 // Pubternal type in public API - IEnumerable propertyActivators -#pragma warning restore PUB0001 - ) + IEnumerable propertyActivators) { if (controllerActivator == null) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs index 857a4b23cb..20f0b74ecc 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultControllerPropertyActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/DefaultControllerPropertyActivator.cs @@ -6,13 +6,12 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; -using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Controllers { - public class DefaultControllerPropertyActivator : IControllerPropertyActivator + internal class DefaultControllerPropertyActivator : IControllerPropertyActivator { private static readonly Func[]> _getPropertiesToActivate = GetPropertiesToActivate; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IControllerPropertyActivatorFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/IControllerPropertyActivatorFactory.cs similarity index 82% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/IControllerPropertyActivatorFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Controllers/IControllerPropertyActivatorFactory.cs index 441dee9898..17606960e2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IControllerPropertyActivatorFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Controllers/IControllerPropertyActivatorFactory.cs @@ -2,9 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Mvc.Controllers; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Controllers { public interface IControllerPropertyActivator { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiBehaviorOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/ApiBehaviorOptionsSetup.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiBehaviorOptionsSetup.cs rename to src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/ApiBehaviorOptionsSetup.cs index 02ae3bc30d..6203729684 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ApiBehaviorOptionsSetup.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/ApiBehaviorOptionsSetup.cs @@ -4,14 +4,15 @@ using System; using System.Collections.Generic; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { - public class ApiBehaviorOptionsSetup : + internal class ApiBehaviorOptionsSetup : ConfigureCompatibilityOptions, IConfigureOptions { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcBuilder.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcBuilder.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcBuilder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcBuilder.cs index d2a0db532e..2a339145df 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcBuilder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcBuilder.cs @@ -3,14 +3,13 @@ using System; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { /// /// Allows fine grained configuration of MVC services. /// - public class MvcBuilder : IMvcBuilder + internal class MvcBuilder : IMvcBuilder { /// /// Initializes a new instance. @@ -39,4 +38,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// public ApplicationPartManager PartManager { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreBuilder.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreBuilder.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreBuilder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreBuilder.cs index 89a9897afd..b6674f6520 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreBuilder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreBuilder.cs @@ -3,14 +3,13 @@ using System; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { /// /// Allows fine grained configuration of essential MVC services. /// - public class MvcCoreBuilder : IMvcCoreBuilder + internal class MvcCoreBuilder : IMvcCoreBuilder { /// /// Initializes a new instance. @@ -41,4 +40,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// public IServiceCollection Services { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs index 57499c930a..37677903ef 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreRouteOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreRouteOptionsSetup.cs similarity index 87% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreRouteOptionsSetup.cs rename to src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreRouteOptionsSetup.cs index 6ed400f506..85af370d9f 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreRouteOptionsSetup.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreRouteOptionsSetup.cs @@ -6,12 +6,12 @@ using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { /// /// Sets up MVC default options for . /// - public class MvcCoreRouteOptionsSetup : IConfigureOptions + internal class MvcCoreRouteOptionsSetup : IConfigureOptions { /// /// Configures the . diff --git a/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs index d645322384..9e36a681de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcMarkerService.cs b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcMarkerService.cs similarity index 74% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcMarkerService.cs rename to src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcMarkerService.cs index c2eb80ada2..337a1baca5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcMarkerService.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcMarkerService.cs @@ -1,15 +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 Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { /// /// A marker class used to determine if all the MVC services were added /// to the before MVC is configured. /// - public class MvcMarkerService + internal class MvcMarkerService { } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/DisableRequestSizeLimitAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/DisableRequestSizeLimitAttribute.cs index b92092667e..0c327e28a6 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/DisableRequestSizeLimitAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/DisableRequestSizeLimitAttribute.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/FileContentResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/FileContentResult.cs index 99385c9bd3..0c33859001 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/FileContentResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/FileContentResult.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/FileStreamResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/FileStreamResult.cs index 486069a5ea..59f0348e78 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/FileStreamResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/FileStreamResult.cs @@ -5,7 +5,6 @@ using System; using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerActionFilter.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerActionFilter.cs index 93e4c4774a..c169d8173c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerActionFilter.cs @@ -4,14 +4,13 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter implementation which delegates to the controller for action filter interfaces. /// - public class ControllerActionFilter : IAsyncActionFilter, IOrderedFilter + internal class ControllerActionFilter : IAsyncActionFilter, IOrderedFilter { // Controller-filter methods run farthest from the action by default. /// @@ -55,7 +54,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } private static async Task ExecuteActionFilter( - ActionExecutingContext context, + ActionExecutingContext context, ActionExecutionDelegate next, IActionFilter actionFilter) { @@ -66,4 +65,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerResultFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerResultFilter.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerResultFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerResultFilter.cs index 3e30debccc..3352c92a9d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerResultFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ControllerResultFilter.cs @@ -4,14 +4,13 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter implementation which delegates to the controller for result filter interfaces. /// - public class ControllerResultFilter : IAsyncResultFilter, IOrderedFilter + internal class ControllerResultFilter : IAsyncResultFilter, IOrderedFilter { // Controller-filter methods run farthest from the result by default. /// @@ -66,4 +65,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultFilterProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/DefaultFilterProvider.cs similarity index 84% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultFilterProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/DefaultFilterProvider.cs index 3e7f685494..03c7c62004 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultFilterProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/DefaultFilterProvider.cs @@ -4,11 +4,10 @@ using System; using System.Diagnostics; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public class DefaultFilterProvider : IFilterProvider + internal class DefaultFilterProvider : IFilterProvider { public int Order => -1000; @@ -35,7 +34,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal { } - public virtual void ProvideFilter(FilterProviderContext context, FilterItem filterItem) + public void ProvideFilter(FilterProviderContext context, FilterItem filterItem) { if (filterItem.Filter != null) { @@ -44,8 +43,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal var filter = filterItem.Descriptor.Filter; - var filterFactory = filter as IFilterFactory; - if (filterFactory == null) + if (!(filter is IFilterFactory filterFactory)) { filterItem.Filter = filter; filterItem.IsReusable = true; @@ -72,9 +70,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal Debug.Assert(actualFilter != null, "actualFilter should not be null"); Debug.Assert(filterMetadata != null, "filterMetadata should not be null"); - var container = actualFilter as IFilterContainer; - - if (container != null) + if (actualFilter is IFilterContainer container) { container.FilterDefinition = filterMetadata; } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DisableRequestSizeLimitFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/DisableRequestSizeLimitFilter.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DisableRequestSizeLimitFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/DisableRequestSizeLimitFilter.cs index 51595bbaa6..75818a6373 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DisableRequestSizeLimitFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/DisableRequestSizeLimitFilter.cs @@ -3,16 +3,15 @@ using System; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter that sets /// to null. /// - public class DisableRequestSizeLimitFilter : IAuthorizationFilter, IRequestSizePolicy + internal class DisableRequestSizeLimitFilter : IAuthorizationFilter, IRequestSizePolicy { private readonly ILogger _logger; @@ -29,8 +28,8 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// to null. /// /// The . - /// If is not enabled or is read-only, - /// the is not applied. + /// If is not enabled or is read-only, + /// the is not applied. public void OnAuthorization(AuthorizationFilterContext context) { if (context == null) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursor.cs similarity index 93% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursor.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursor.cs index b297712bd0..73caf18f3f 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursor.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.AspNetCore.Mvc.Filters; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A one-way cursor for filters. @@ -25,7 +23,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// Result /// /// - public struct FilterCursor + internal struct FilterCursor { private readonly IFilterMetadata[] _filters; private int _index; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursorItem.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursorItem.cs similarity index 79% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursorItem.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursorItem.cs index a62aa1b8cc..c925d49ab2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterCursorItem.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCursorItem.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.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public readonly struct FilterCursorItem + internal readonly struct FilterCursorItem { public FilterCursorItem(TFilter filter, TFilterAsync filterAsync) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs similarity index 88% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs index daadc073d4..1e43ed8280 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterDescriptorOrderComparer.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs @@ -5,9 +5,9 @@ using System; using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public class FilterDescriptorOrderComparer : IComparer + internal class FilterDescriptorOrderComparer : IComparer { public static FilterDescriptorOrderComparer Comparer { get; } = new FilterDescriptorOrderComparer(); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactory.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactory.cs index 4f53acfef5..cc7563703b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactory.cs @@ -4,11 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public static class FilterFactory + internal static class FilterFactory { public static FilterFactoryResult GetAllFilters( IFilterProvider[] filterProviders, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactoryResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactoryResult.cs similarity index 79% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactoryResult.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactoryResult.cs index 69e39cfea9..2f03f4d305 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/FilterFactoryResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterFactoryResult.cs @@ -1,11 +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. -using Microsoft.AspNetCore.Mvc.Filters; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public readonly struct FilterFactoryResult + internal readonly struct FilterFactoryResult { public FilterFactoryResult( FilterItem[] cacheableFilters, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IMiddlewareFilterFeature.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/IMiddlewareFilterFeature.cs similarity index 83% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/IMiddlewareFilterFeature.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/IMiddlewareFilterFeature.cs index 43af488b8a..cc9bcd38af 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IMiddlewareFilterFeature.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/IMiddlewareFilterFeature.cs @@ -1,19 +1,17 @@ // 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.AspNetCore.Mvc.Filters; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A feature in which is used to capture the /// currently executing context of a resource filter. This feature is used in the final middleware /// of a middleware filter's pipeline to keep the request flow through the rest of the MVC layers. /// - public interface IMiddlewareFilterFeature + internal interface IMiddlewareFilterFeature { ResourceExecutingContext ResourceExecutingContext { get; } ResourceExecutionDelegate ResourceExecutionDelegate { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IResponseCacheFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/IResponseCacheFilter.cs similarity index 67% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/IResponseCacheFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/IResponseCacheFilter.cs index 5b53c254dd..9d43079624 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IResponseCacheFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/IResponseCacheFilter.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 Microsoft.AspNetCore.Mvc.Filters; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter which sets the appropriate headers related to Response caching. /// - public interface IResponseCacheFilter : IFilterMetadata + internal interface IResponseCacheFilter : IFilterMetadata { } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilter.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilter.cs index 11ac93d5ab..d84bd188c8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilter.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter which executes a user configured middleware pipeline. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterAttribute.cs index 019f1551f3..be4b3f8270 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterAttribute.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilder.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilder.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilder.cs index 6257968f90..de689d3e2c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilder.cs @@ -7,12 +7,12 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// Builds a middleware pipeline after receiving the pipeline from a pipeline provider /// - public class MiddlewareFilterBuilder + internal class MiddlewareFilterBuilder { // 'GetOrAdd' call on the dictionary is not thread safe and we might end up creating the pipeline more // once. To prevent this Lazy<> is used. In the worst case multiple Lazy<> objects are created for multiple diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilderStartupFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilderStartupFilter.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilderStartupFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilderStartupFilter.cs index d568da7b51..563942e57c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterBuilderStartupFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterBuilderStartupFilter.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { internal class MiddlewareFilterBuilderStartupFilter : IStartupFilter { @@ -23,4 +23,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterConfigurationProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterConfigurationProvider.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterConfigurationProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterConfigurationProvider.cs index ca05f4d6df..a22b126333 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterConfigurationProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterConfigurationProvider.cs @@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// Calls into user provided 'Configure' methods for configuring a middleware pipeline. The semantics of finding /// the 'Configure' methods is similar to the application Startup class. /// - public class MiddlewareFilterConfigurationProvider + internal class MiddlewareFilterConfigurationProvider { public Action CreateConfigureDelegate(Type configurationType) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterFeature.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterFeature.cs similarity index 69% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterFeature.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterFeature.cs index d33378d6f7..7a0da41b91 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MiddlewareFilterFeature.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/MiddlewareFilterFeature.cs @@ -1,11 +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. -using Microsoft.AspNetCore.Mvc.Filters; - -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public class MiddlewareFilterFeature : IMiddlewareFilterFeature + internal class MiddlewareFilterFeature : IMiddlewareFilterFeature { public ResourceExecutingContext ResourceExecutingContext { get; set; } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestFormLimitsFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestFormLimitsFilter.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestFormLimitsFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestFormLimitsFilter.cs index c60e7e2ea2..175e888d95 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestFormLimitsFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestFormLimitsFilter.cs @@ -3,15 +3,14 @@ using System; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// A filter that configures for the current request. /// - public class RequestFormLimitsFilter : IAuthorizationFilter, IRequestFormLimitsPolicy + internal class RequestFormLimitsFilter : IAuthorizationFilter, IRequestFormLimitsPolicy { private readonly ILogger _logger; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestSizeLimitFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestSizeLimitFilter.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestSizeLimitFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestSizeLimitFilter.cs index c5653f99a5..7cc2390c23 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RequestSizeLimitFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/RequestSizeLimitFilter.cs @@ -3,16 +3,15 @@ using System; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// - /// A filter that sets the + /// A filter that sets the /// to the specified . /// - public class RequestSizeLimitFilter : IAuthorizationFilter, IRequestSizePolicy + internal class RequestSizeLimitFilter : IAuthorizationFilter, IRequestSizePolicy { private readonly ILogger _logger; @@ -30,7 +29,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// Sets the to . /// /// The . - /// If is not enabled or is read-only, + /// If is not enabled or is read-only, /// the is not applied. public void OnAuthorization(AuthorizationFilterContext context) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilter.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilter.cs index 55d63fc975..8996ff90de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilter.cs @@ -2,15 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { /// /// An which sets the appropriate headers related to response caching. /// - public class ResponseCacheFilter : IActionFilter, IResponseCacheFilter + internal class ResponseCacheFilter : IActionFilter, IResponseCacheFilter { private readonly ResponseCacheFilterExecutor _executor; private readonly ILogger _logger; @@ -105,4 +104,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal { } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilterExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilterExecutor.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilterExecutor.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilterExecutor.cs index 02100b838e..cdff970483 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseCacheFilterExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/ResponseCacheFilterExecutor.cs @@ -2,16 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Diagnostics; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.ResponseCaching; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { - public class ResponseCacheFilterExecutor + internal class ResponseCacheFilterExecutor { private readonly CacheProfile _cacheProfile; private int? _cacheDuration; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ForbidResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/ForbidResult.cs index b967d74c08..78e4fc1274 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ForbidResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ForbidResult.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AcceptHeaderParser.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/AcceptHeaderParser.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/AcceptHeaderParser.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/AcceptHeaderParser.cs index 289e151226..16e26b2165 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AcceptHeaderParser.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/AcceptHeaderParser.cs @@ -5,9 +5,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace Microsoft.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { - public static class AcceptHeaderParser + internal static class AcceptHeaderParser { public static IList ParseAcceptHeader(IList acceptHeaders) { @@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Internal } // We deliberately want to ignore media types that we are not capable of parsing. - // This is due to the fact that some browsers will send invalid media types like + // This is due to the fact that some browsers will send invalid media types like // ; q=0.9 or */;q=0.2, etc. // In this scenario, our recovery action consists of advancing the pointer to the // next separator and moving on. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/FormatFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/FormatFilter.cs index e70f0130c9..5ba22953e5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/FormatFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/FormatFilter.cs @@ -6,8 +6,6 @@ using System.Globalization; using System.Linq; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpParseResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/HttpParseResult.cs similarity index 73% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpParseResult.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/HttpParseResult.cs index 84e76f08d4..71b0f57a7e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpParseResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/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.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { - public enum HttpParseResult + internal enum HttpParseResult { Parsed, NotParsed, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpTokenParsingRules.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/HttpTokenParsingRules.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpTokenParsingRules.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/HttpTokenParsingRules.cs index a93f26d916..1f478eb564 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/HttpTokenParsingRules.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/HttpTokenParsingRules.cs @@ -4,9 +4,9 @@ using System.Diagnostics.Contracts; using System.Text; -namespace Microsoft.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { - public static class HttpTokenParsingRules + internal static class HttpTokenParsingRules { private static readonly bool[] TokenChars; private const int MaxNestedCount = 5; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IFormatFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/IFormatFilter.cs similarity index 87% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/IFormatFilter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/IFormatFilter.cs index 911ca2d247..185b0cfb3c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IFormatFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/IFormatFilter.cs @@ -3,12 +3,12 @@ using Microsoft.AspNetCore.Mvc.Filters; -namespace Microsoft.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { /// /// A filter that produces the desired content type for the request. /// - public interface IFormatFilter : IFilterMetadata + internal interface IFormatFilter : IFilterMetadata { /// /// Gets the format value for the request associated with the provided . @@ -17,4 +17,4 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Internal /// A format value, or null if a format cannot be determined for the request. string GetFormat(ActionContext context); } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaType.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaType.cs index 7c557ed4cc..8e7103d588 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaType.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaType.cs @@ -5,7 +5,6 @@ using System; using System.Globalization; using System.Text; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; using Microsoft.Extensions.Primitives; namespace Microsoft.AspNetCore.Mvc.Formatters @@ -393,9 +392,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters /// The media type to parse. /// The position at which the parsing starts. /// The parsed media type with its associated quality. -#pragma warning disable PUB0001 // Pubternal type in public API public static MediaTypeSegmentWithQuality CreateMediaTypeSegmentWithQuality(string mediaType, int start) -#pragma warning restore PUB0001 { var parsedMediaType = new MediaType(mediaType, start, length: null); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs index 52d6281ed1..66714ae17b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MediaTypeSegmentWithQuality.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeSegmentWithQuality.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { /// /// A media type with its associated quality. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseContentTypeHelper.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/ResponseContentTypeHelper.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseContentTypeHelper.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Formatters/ResponseContentTypeHelper.cs index 936ef92973..cc6dde7a08 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResponseContentTypeHelper.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/ResponseContentTypeHelper.cs @@ -4,11 +4,10 @@ using System.Diagnostics; using System.Text; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Formatters; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { - public static class ResponseContentTypeHelper + internal static class ResponseContentTypeHelper { /// /// Gets the content type and encoding that need to be used for the response. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionInvokerFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionInvokerFactory.cs similarity index 87% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionInvokerFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionInvokerFactory.cs index b654ea26a8..58b08b4b31 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionInvokerFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionInvokerFactory.cs @@ -4,11 +4,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Infrastructure; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ActionInvokerFactory : IActionInvokerFactory + internal class ActionInvokerFactory : IActionInvokerFactory { private readonly IActionInvokerProvider[] _actionInvokerProviders; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionMethodExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionMethodExecutor.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionMethodExecutor.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionMethodExecutor.cs index 806b97d1e5..3829e404de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionMethodExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionMethodExecutor.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { internal abstract class ActionMethodExecutor { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionResultTypeMapper.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionResultTypeMapper.cs similarity index 84% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionResultTypeMapper.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionResultTypeMapper.cs index 82f1d02998..de9a74eeb4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionResultTypeMapper.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionResultTypeMapper.cs @@ -2,11 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Mvc.Infrastructure; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ActionResultTypeMapper : IActionResultTypeMapper + internal class ActionResultTypeMapper : IActionResultTypeMapper { public Type GetResultDataType(Type returnType) { @@ -15,7 +14,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal throw new ArgumentNullException(nameof(returnType)); } - if (returnType.IsGenericType && + if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(ActionResult<>)) { return returnType.GetGenericArguments()[0]; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionSelector.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionSelector.cs index 5dba1a7654..834862f568 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionSelector.cs @@ -15,12 +15,12 @@ using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// /// A default implementation. /// - public class ActionSelector : IActionSelector + internal class ActionSelector : IActionSelector { private static readonly IReadOnlyList EmptyActions = Array.Empty(); @@ -146,7 +146,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// The set of actions that satisfy all constraints. /// A list of the best matching actions. - protected virtual IReadOnlyList SelectBestActions(IReadOnlyList actions) + private IReadOnlyList SelectBestActions(IReadOnlyList actions) { return actions; } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AmbiguousActionException.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/AmbiguousActionException.cs similarity index 83% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/AmbiguousActionException.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/AmbiguousActionException.cs index 6b1a34d893..afe28c0209 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AmbiguousActionException.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/AmbiguousActionException.cs @@ -4,13 +4,13 @@ using System; using System.Runtime.Serialization; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// /// An exception which indicates multiple matches in action selection. /// [Serializable] - public class AmbiguousActionException : InvalidOperationException + internal class AmbiguousActionException : InvalidOperationException { public AmbiguousActionException(string message) : base(message) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ClientErrorResultFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ClientErrorResultFilter.cs index 1ef66b1a33..b9babd87a0 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ClientErrorResultFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ClientErrorResultFilter.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.Infrastructure diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ContentResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ContentResultExecutor.cs index 7a1f333b3a..f73e1b72ea 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ContentResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ContentResultExecutor.cs @@ -2,9 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Text; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.Infrastructure @@ -36,14 +35,12 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure var response = context.HttpContext.Response; - string resolvedContentType; - Encoding resolvedContentTypeEncoding; ResponseContentTypeHelper.ResolveContentTypeAndEncoding( result.ContentType, response.ContentType, DefaultContentType, - out resolvedContentType, - out resolvedContentTypeEncoding); + out var resolvedContentType, + out var resolvedContentTypeEncoding); response.ContentType = resolvedContentType; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvoker.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvoker.cs index 767ed08505..448f6b4191 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvoker.cs @@ -8,14 +8,13 @@ using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ControllerActionInvoker : ResourceInvoker, IActionInvoker + internal class ControllerActionInvoker : ResourceInvoker, IActionInvoker { private readonly ControllerActionInvokerCacheEntry _cacheEntry; private readonly ControllerContext _controllerContext; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCache.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCache.cs index 0c6bd2adc1..e7628769e4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCache.cs @@ -12,9 +12,9 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ControllerActionInvokerCache + internal class ControllerActionInvokerCache { private readonly IActionDescriptorCollectionProvider _collectionProvider; private readonly ParameterBinder _parameterBinder; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCacheEntry.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCacheEntry.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCacheEntry.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCacheEntry.cs index 6b06f0e02b..17810cf866 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerCacheEntry.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerCacheEntry.cs @@ -2,12 +2,13 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ControllerActionInvokerCacheEntry + internal class ControllerActionInvokerCacheEntry { internal ControllerActionInvokerCacheEntry( FilterItem[] cachedFilters, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerProvider.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerProvider.cs index b9b135ff52..26862696df 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvokerProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ControllerActionInvokerProvider.cs @@ -7,14 +7,13 @@ using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class ControllerActionInvokerProvider : IActionInvokerProvider + internal class ControllerActionInvokerProvider : IActionInvokerProvider { private readonly ControllerActionInvokerCache _controllerActionInvokerCache; private readonly IReadOnlyList _valueProviderFactories; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/CopyOnWriteList.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/CopyOnWriteList.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/CopyOnWriteList.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/CopyOnWriteList.cs index a051b69cff..44252104de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/CopyOnWriteList.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/CopyOnWriteList.cs @@ -4,9 +4,9 @@ using System.Collections; using System.Collections.Generic; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public class CopyOnWriteList : IList + internal class CopyOnWriteList : IList { private readonly IReadOnlyList _source; private List _copy; @@ -16,9 +16,9 @@ namespace Microsoft.AspNetCore.Mvc.Internal _source = source; } - protected IReadOnlyList Readable => _copy ?? _source; + private IReadOnlyList Readable => _copy ?? _source; - protected List Writable + private List Writable { get { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/DefaultOutputFormatterSelector.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/DefaultOutputFormatterSelector.cs index 61a62ec63f..bafe6d239d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/DefaultOutputFormatterSelector.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/DefaultOutputFormatterSelector.cs @@ -7,8 +7,6 @@ using System.Collections.ObjectModel; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileContentResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileContentResultExecutor.cs index 6d194c52f8..e4c2aef2c2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileContentResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileContentResultExecutor.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileResultExecutorBase.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileResultExecutorBase.cs index 8c2ecb98a2..bfd5546bed 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileResultExecutorBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileResultExecutorBase.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Http.Headers; using Microsoft.AspNetCore.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileStreamResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileStreamResultExecutor.cs index 6cb300eff1..df3a6feb28 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileStreamResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/FileStreamResultExecutor.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/IActionSelector.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/IActionSelector.cs index 30c9902e7d..d372b39d8b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/IActionSelector.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/IActionSelector.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure /// The associated with the current request. /// The set of candidates. /// The best candidate for the current request or null. - /// + /// /// Thrown when action selection results in an ambiguity. /// /// diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ITypeActivatorCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ITypeActivatorCache.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ITypeActivatorCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ITypeActivatorCache.cs index a097b29910..f412c6ae20 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ITypeActivatorCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ITypeActivatorCache.cs @@ -3,10 +3,10 @@ using System; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// - /// Caches instances produced by + /// Caches instances produced by /// . /// public interface ITypeActivatorCache @@ -19,4 +19,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// The of the to create. TInstance CreateInstance(IServiceProvider serviceProvider, Type optionType); } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/LocalRedirectResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/LocalRedirectResultExecutor.cs index 9ae7a3bda5..e44d5deb97 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/LocalRedirectResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/LocalRedirectResultExecutor.cs @@ -5,7 +5,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs index 88f6f8428c..aff1df69a9 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpRequestStreamReaderFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpRequestStreamReaderFactory.cs @@ -5,15 +5,14 @@ using System; using System.Buffers; using System.IO; using System.Text; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.WebUtilities; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// /// An that uses pooled buffers. /// - public class MemoryPoolHttpRequestStreamReaderFactory : IHttpRequestStreamReaderFactory + internal class MemoryPoolHttpRequestStreamReaderFactory : IHttpRequestStreamReaderFactory { /// /// The default size of created char buffers. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs similarity index 93% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs index 91dd31e0c7..56978067c5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MemoryPoolHttpResponseStreamWriterFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MemoryPoolHttpResponseStreamWriterFactory.cs @@ -5,15 +5,14 @@ using System; using System.Buffers; using System.IO; using System.Text; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.WebUtilities; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// /// An that uses pooled buffers. /// - public class MemoryPoolHttpResponseStreamWriterFactory : IHttpResponseStreamWriterFactory + internal class MemoryPoolHttpResponseStreamWriterFactory : IHttpResponseStreamWriterFactory { /// /// The default size of buffers s will allocate. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilter.cs index c535bb118b..2cfc4ec773 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilter.cs @@ -4,7 +4,6 @@ using System; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.Infrastructure diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilterFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilterFactory.cs index 3f5c81dc98..6fe848ae9e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilterFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ModelStateInvalidFilterFactory.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Mvc.Infrastructure { - internal sealed class ModelStateInvalidFilterFactory : IFilterFactory, IOrderedFilter + internal class ModelStateInvalidFilterFactory : IFilterFactory, IOrderedFilter { public int Order => ModelStateInvalidFilter.FilterOrder; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MvcCoreMvcOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MvcCoreMvcOptionsSetup.cs index 7b89b69ee6..81ba0b2ace 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MvcCoreMvcOptionsSetup.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/MvcCoreMvcOptionsSetup.cs @@ -8,7 +8,6 @@ using System.Threading; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NonDisposableStream.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/NonDisposableStream.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/NonDisposableStream.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/NonDisposableStream.cs index 9cc9a46ea4..a5260ae63b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NonDisposableStream.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/NonDisposableStream.cs @@ -6,14 +6,14 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// /// Stream that delegates to an inner stream. /// This Stream is present so that the inner stream is not closed /// even when Close() or Dispose() is called. /// - public class NonDisposableStream : Stream + internal class NonDisposableStream : Stream { private readonly Stream _innerStream; @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// The inner stream this object delegates to. /// - protected Stream InnerStream => _innerStream; + private Stream InnerStream => _innerStream; /// public override bool CanRead => _innerStream.CanRead; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ObjectResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ObjectResultExecutor.cs index d48d213532..6c5179d222 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ObjectResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ObjectResultExecutor.cs @@ -9,7 +9,6 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.Infrastructure diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ParameterDefaultValues.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ParameterDefaultValues.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ParameterDefaultValues.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ParameterDefaultValues.cs index 8263da1650..b7259fc9b7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ParameterDefaultValues.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ParameterDefaultValues.cs @@ -6,9 +6,9 @@ using System.ComponentModel; using System.Reflection; using Microsoft.Extensions.Internal; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public static class ParameterDefaultValues + internal static class ParameterDefaultValues { public static object[] GetParameterDefaultValues(MethodInfo methodInfo) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/PhysicalFileResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/PhysicalFileResultExecutor.cs index fa4757212d..1702e2b340 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/PhysicalFileResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/PhysicalFileResultExecutor.cs @@ -7,7 +7,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectResultExecutor.cs index e8f80b17da..8a480cc237 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectResultExecutor.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToActionResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToActionResultExecutor.cs index b1b131274b..187968c1af 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToActionResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToActionResultExecutor.cs @@ -5,7 +5,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToPageResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToPageResultExecutor.cs index ee1c060e87..3e87985983 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToPageResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToPageResultExecutor.cs @@ -5,7 +5,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToRouteResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToRouteResultExecutor.cs index 04e15feacf..268ddd37cc 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToRouteResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/RedirectToRouteResultExecutor.cs @@ -5,7 +5,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResourceInvoker.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ResourceInvoker.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ResourceInvoker.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ResourceInvoker.cs index 2b73da1c0f..92a80ef42a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ResourceInvoker.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ResourceInvoker.cs @@ -8,14 +8,13 @@ using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { - public abstract class ResourceInvoker + internal abstract class ResourceInvoker { protected readonly DiagnosticSource _diagnosticSource; protected readonly ILogger _logger; @@ -632,7 +631,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // either by setting ExceptionHandled, or nulling out the Exception or setting a result // on the ExceptionContext. // - // We need to execute the result (if any) and then exit gracefully which unwinding Resource + // We need to execute the result (if any) and then exit gracefully which unwinding Resource // filters. Debug.Assert(state != null); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/TypeActivatorCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/TypeActivatorCache.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/TypeActivatorCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/TypeActivatorCache.cs index 36c0d947d3..52ff0d2ddf 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/TypeActivatorCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/TypeActivatorCache.cs @@ -5,13 +5,13 @@ using System; using System.Collections.Concurrent; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { /// - /// Caches instances produced by + /// Caches instances produced by /// . /// - public class TypeActivatorCache : ITypeActivatorCache + internal class TypeActivatorCache : ITypeActivatorCache { private readonly Func _createFactory = (type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes); @@ -37,4 +37,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal return (TInstance)createFactory(serviceProvider, arguments: null); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/VirtualFileResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/VirtualFileResultExecutor.cs index d9702a572f..97a0584b9f 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/VirtualFileResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/VirtualFileResultExecutor.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/LocalRedirectResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/LocalRedirectResult.cs index ca20eb5020..a600c39079 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/LocalRedirectResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/LocalRedirectResult.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/BodyModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/BodyModelBinder.cs index 8e0744cfda..dd4051973c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/BodyModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/BodyModelBinder.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ByteArrayModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ByteArrayModelBinder.cs index 99461f9ec9..c3772d8383 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ByteArrayModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ByteArrayModelBinder.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/CollectionModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/CollectionModelBinder.cs index 372a7da770..881eb12992 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/CollectionModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/CollectionModelBinder.cs @@ -9,8 +9,6 @@ using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ComplexTypeModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ComplexTypeModelBinder.cs index 5c1e82a80c..2da15ed858 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ComplexTypeModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/ComplexTypeModelBinder.cs @@ -7,7 +7,6 @@ using System.Linq.Expressions; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DecimalModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DecimalModelBinder.cs index 7692baa009..3670185732 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DecimalModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DecimalModelBinder.cs @@ -5,7 +5,6 @@ using System; using System.Globalization; using System.Runtime.ExceptionServices; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DictionaryModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DictionaryModelBinder.cs index 0954f87e6c..d060a065f8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DictionaryModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DictionaryModelBinder.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DoubleModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DoubleModelBinder.cs index 77d32d5a0d..3a62b2fa39 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DoubleModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/DoubleModelBinder.cs @@ -5,7 +5,6 @@ using System; using System.Globalization; using System.Runtime.ExceptionServices; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FloatModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FloatModelBinder.cs index 515266d2df..c34a8be777 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FloatModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FloatModelBinder.cs @@ -5,7 +5,6 @@ using System; using System.Globalization; using System.Runtime.ExceptionServices; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormCollectionModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormCollectionModelBinder.cs index 41d96ed272..3c26cafb2d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormCollectionModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormCollectionModelBinder.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Primitives; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormFileModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormFileModelBinder.cs index 76b4bf54ca..526225343e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormFileModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormFileModelBinder.cs @@ -8,8 +8,6 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinder.cs index e9de376246..54ce71f896 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinder.cs @@ -6,8 +6,6 @@ using System.Diagnostics; using System.Globalization; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinderProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinderProvider.cs index c0f46ff93c..2b885e3617 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinderProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/HeaderModelBinderProvider.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.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/KeyValuePairModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/KeyValuePairModelBinder.cs index ee90c3f01e..45aab720ba 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/KeyValuePairModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/KeyValuePairModelBinder.cs @@ -4,8 +4,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/SimpleTypeModelBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/SimpleTypeModelBinder.cs index 017049e769..de1f1da636 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/SimpleTypeModelBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/SimpleTypeModelBinder.cs @@ -5,7 +5,6 @@ using System; using System.ComponentModel; using System.Runtime.ExceptionServices; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultModelBindingContext.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultModelBindingContext.cs similarity index 100% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultModelBindingContext.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultModelBindingContext.cs diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultPropertyFilterProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultPropertyFilterProvider.cs index 3d1bc81a71..6105b3adf0 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultPropertyFilterProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/DefaultPropertyFilterProvider.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; namespace Microsoft.AspNetCore.Mvc.ModelBinding { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ElementalValueProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ElementalValueProvider.cs similarity index 87% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ElementalValueProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ElementalValueProvider.cs index 83bfeed66a..7fefe4c9f8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ElementalValueProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ElementalValueProvider.cs @@ -3,11 +3,10 @@ using System; using System.Globalization; -using Microsoft.AspNetCore.Mvc.ModelBinding; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { - public class ElementalValueProvider : IValueProvider + internal class ElementalValueProvider : IValueProvider { public ElementalValueProvider(string key, string value, CultureInfo culture) { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs index 122d760af8..22df255b21 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/EmptyModelMetadataProvider.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.Collections.Generic; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/FormValueProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/FormValueProvider.cs index da13af979e..6a07ba4f67 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/FormValueProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/FormValueProvider.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Globalization; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.ModelBinding { @@ -46,9 +45,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding public CultureInfo Culture => _culture; -#pragma warning disable PUB0001 // Pubternal type in public API protected PrefixContainer PrefixContainer -#pragma warning restore PUB0001 { get { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/JQueryValueProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/JQueryValueProvider.cs index 6ae1c84377..0789e6b50b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/JQueryValueProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/JQueryValueProvider.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Primitives; namespace Microsoft.AspNetCore.Mvc.ModelBinding @@ -52,9 +51,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding public CultureInfo Culture { get; } /// -#pragma warning disable PUB0001 // Pubternal type in public API protected PrefixContainer PrefixContainer -#pragma warning restore PUB0001 { get { @@ -82,8 +79,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding /// public override ValueProviderResult GetValue(string key) { - StringValues values; - if (_values.TryGetValue(key, out values) && values.Count > 0) + if (_values.TryGetValue(key, out var values) && values.Count > 0) { return new ValueProviderResult(values, Culture); } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs index 8e0546b992..5cc570394b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultBindingMetadataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultBindingMetadataProvider.cs @@ -5,15 +5,13 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata { /// /// A default implementation of . /// - public class DefaultBindingMetadataProvider : IBindingMetadataProvider + internal class DefaultBindingMetadataProvider : IBindingMetadataProvider { public void CreateBindingMetadata(BindingMetadataProviderContext context) { @@ -128,4 +126,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs similarity index 80% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs index 37dfed3868..18792c320e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCompositeMetadataDetailsProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultCompositeMetadataDetailsProvider.cs @@ -4,14 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata { /// /// A default implementation of . /// - public class DefaultCompositeMetadataDetailsProvider : ICompositeMetadataDetailsProvider + internal class DefaultCompositeMetadataDetailsProvider : ICompositeMetadataDetailsProvider { private readonly IEnumerable _providers; @@ -25,7 +24,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } /// - public virtual void CreateBindingMetadata(BindingMetadataProviderContext context) + public void CreateBindingMetadata(BindingMetadataProviderContext context) { if (context == null) { @@ -39,7 +38,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } /// - public virtual void CreateDisplayMetadata(DisplayMetadataProviderContext context) + public void CreateDisplayMetadata(DisplayMetadataProviderContext context) { if (context == null) { @@ -53,7 +52,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } /// - public virtual void CreateValidationMetadata(ValidationMetadataProviderContext context) + public void CreateValidationMetadata(ValidationMetadataProviderContext context) { if (context == null) { @@ -66,4 +65,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs similarity index 93% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs index 03faa4be62..c8df349ccd 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultValidationMetadataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Metadata/DefaultValidationMetadataProvider.cs @@ -4,15 +4,14 @@ using System; using System.Linq; using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata { /// /// A default implementation of . /// - public class DefaultValidationMetadataProvider : IValidationMetadataProvider + internal class DefaultValidationMetadataProvider : IValidationMetadataProvider { /// public void CreateValidationMetadata(ValidationMetadataProviderContext context) @@ -56,4 +55,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBinderFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBinderFactory.cs index 4b7a53b498..c9d973db2b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBinderFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBinderFactory.cs @@ -8,7 +8,6 @@ using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ModelBindingHelper.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBindingHelper.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ModelBindingHelper.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBindingHelper.cs index 90d8dd79f1..bc2f84b235 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ModelBindingHelper.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ModelBindingHelper.cs @@ -14,9 +14,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.ModelBinding.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { - public static class ModelBindingHelper + internal static class ModelBindingHelper { /// /// Updates the specified instance using the specified diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NoOpBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/NoOpBinder.cs similarity index 76% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/NoOpBinder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/NoOpBinder.cs index 0fd7146fc3..7f591d6a8b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NoOpBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/NoOpBinder.cs @@ -2,11 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.ModelBinding; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { - public class NoOpBinder : IModelBinder + internal class NoOpBinder : IModelBinder { public static readonly IModelBinder Instance = new NoOpBinder(); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ObjectModelValidator.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ObjectModelValidator.cs index 6c34f35c2f..43785d55cd 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ObjectModelValidator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ObjectModelValidator.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; namespace Microsoft.AspNetCore.Mvc.ModelBinding @@ -101,9 +100,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding public abstract ValidationVisitor GetValidationVisitor( ActionContext actionContext, IModelValidatorProvider validatorProvider, -#pragma warning disable PUB0001 // Pubternal type in public API ValidatorCache validatorCache, -#pragma warning restore PUB0001 IModelMetadataProvider metadataProvider, ValidationStateDictionary validationState); } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ParameterBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ParameterBinder.cs index 0cf3693eb1..f0129749d9 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ParameterBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ParameterBinder.cs @@ -5,7 +5,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PlaceholderBinder.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PlaceholderBinder.cs similarity index 84% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/PlaceholderBinder.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PlaceholderBinder.cs index 0e6bdc07a1..dc3d79618f 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PlaceholderBinder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PlaceholderBinder.cs @@ -2,15 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.ModelBinding; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { // Used as a placeholder to break cycles while building a tree of model binders in ModelBinderFactory. // // When a cycle is detected by a call to Create(...), we create an instance of this class and return it // to break the cycle. Later when the 'real' binder is created we set Inner to point to that. - public class PlaceholderBinder : IModelBinder + internal class PlaceholderBinder : IModelBinder { public IModelBinder Inner { get; set; } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PrefixContainer.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PrefixContainer.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/PrefixContainer.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PrefixContainer.cs index ade8cc8102..aa4b0a6f6b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PrefixContainer.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PrefixContainer.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { /// /// This is a container for prefix values. It normalizes all the values into dotted-form and then stores diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PropertyValueSetter.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PropertyValueSetter.cs similarity index 89% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/PropertyValueSetter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PropertyValueSetter.cs index a6983106da..353a39a724 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/PropertyValueSetter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/PropertyValueSetter.cs @@ -3,11 +3,10 @@ using System.Collections.Generic; using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { - public static class PropertyValueSetter + internal static class PropertyValueSetter { private static readonly MethodInfo CallPropertyAddRangeOpenGenericMethod = typeof(PropertyValueSetter).GetMethod(nameof(CallPropertyAddRange), BindingFlags.NonPublic | BindingFlags.Static); @@ -58,8 +57,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal private static void CallPropertyAddRange(object target, object source) { var targetCollection = (ICollection)target; - var sourceCollection = source as IEnumerable; - if (sourceCollection != null && !targetCollection.IsReadOnly) + if (source is IEnumerable sourceCollection && !targetCollection.IsReadOnly) { targetCollection.Clear(); foreach (var item in sourceCollection) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/QueryStringValueProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/QueryStringValueProvider.cs index e7d62e3852..e59048c542 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/QueryStringValueProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/QueryStringValueProvider.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Globalization; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.ModelBinding { @@ -46,9 +45,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding public CultureInfo Culture => _culture; -#pragma warning disable PUB0001 // Pubternal type in public API protected PrefixContainer PrefixContainer -#pragma warning restore PUB0001 { get { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ReferenceEqualityComparer.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ReferenceEqualityComparer.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ReferenceEqualityComparer.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ReferenceEqualityComparer.cs index e2288a01c8..ec41a7f810 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ReferenceEqualityComparer.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/ReferenceEqualityComparer.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { internal class ReferenceEqualityComparer : IEqualityComparer { @@ -31,4 +31,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal return RuntimeHelpers.GetHashCode(obj); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/RouteValueProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/RouteValueProvider.cs index 615b4bd437..ee1335711b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/RouteValueProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/RouteValueProvider.cs @@ -3,7 +3,6 @@ using System; using System.Globalization; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; namespace Microsoft.AspNetCore.Mvc.ModelBinding @@ -57,9 +56,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding Culture = culture; } -#pragma warning disable PUB0001 // Pubternal type in public API protected PrefixContainer PrefixContainer -#pragma warning restore PUB0001 { get { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ClientValidatorCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ClientValidatorCache.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ClientValidatorCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ClientValidatorCache.cs index 0bcc97f67b..2697daec71 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ClientValidatorCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ClientValidatorCache.cs @@ -5,10 +5,8 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ClientValidatorCache { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs similarity index 93% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs index 322f55d55b..95dc8db0e8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultCollectionValidationStrategy.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultCollectionValidationStrategy.cs @@ -5,12 +5,10 @@ using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using System.Linq.Expressions; +using System.Reflection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { /// /// The default implementation of for a collection. @@ -18,28 +16,28 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// This implementation handles cases like: /// - /// Model: IList<Student> + /// Model: IList<Student> /// Query String: ?students[0].Age=8&students[1].Age=9 - /// + /// /// In this case the elements of the collection are identified in the input data set by an incrementing /// integer index. /// - /// + /// /// or: - /// + /// /// - /// Model: IDictionary<string, int> + /// Model: IDictionary<string, int> /// Query String: ?students[0].Key=Joey&students[0].Value=8 - /// + /// /// In this case the dictionary is treated as a collection of key-value pairs, and the elements of the /// collection are identified in the input data set by an incrementing integer index. /// - /// + /// /// Using this key format, the enumerator enumerates model objects of type matching /// . The indices of the elements in the collection are used to /// compute the model prefix keys. /// - public class DefaultCollectionValidationStrategy : IValidationStrategy + internal class DefaultCollectionValidationStrategy : IValidationStrategy { private static readonly MethodInfo _getEnumerator = typeof(DefaultCollectionValidationStrategy) .GetMethod(nameof(GetEnumerator), BindingFlags.Static | BindingFlags.NonPublic); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs index a2a1e0323a..f82ec567f1 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/DefaultComplexObjectValidationStrategy.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultComplexObjectValidationStrategy.cs @@ -5,15 +5,13 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { /// /// The default implementation of for a complex object. /// - public class DefaultComplexObjectValidationStrategy : IValidationStrategy + internal class DefaultComplexObjectValidationStrategy : IValidationStrategy { private static readonly bool IsMono = Type.GetType("Mono.Runtime") != null; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs index 2174be1417..4abcdc4d44 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultModelValidatorProvider.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation /// The provides validators from /// instances in . /// - internal sealed class DefaultModelValidatorProvider : IMetadataBasedModelValidatorProvider + internal class DefaultModelValidatorProvider : IMetadataBasedModelValidatorProvider { /// public void CreateValidators(ModelValidatorProviderContext context) @@ -50,4 +50,4 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation return false; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/DefaultObjectValidator.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs similarity index 91% rename from src/Microsoft.AspNetCore.Mvc.Core/DefaultObjectValidator.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs index ff175dc5cf..102634f3f4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/DefaultObjectValidator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/DefaultObjectValidator.cs @@ -2,11 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { /// /// The default implementation of . diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs similarity index 92% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs index eb955d6964..4c63b2cbaa 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ExplicitIndexCollectionValidationStrategy.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategy.cs @@ -4,10 +4,8 @@ using System; using System.Collections; using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { /// /// An implementation of for a collection bound using 'explicit indexing' @@ -16,20 +14,20 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// /// This implementation handles cases like: /// - /// Model: IList<Student> + /// Model: IList<Student> /// Query String: ?students.index=Joey,Katherine&students[Joey].Age=8&students[Katherine].Age=9 - /// + /// /// In this case, 'Joey' and 'Katherine' need to be used in the model prefix keys, but cannot be inferred - /// form inspecting the collection. These prefixes are captured during model binding, and mapped to + /// form inspecting the collection. These prefixes are captured during model binding, and mapped to /// the corresponding ordinal index of a model object in the collection. The enumerator returned from this /// class will yield two 'Student' objects with corresponding keys 'students[Joey]' and 'students[Katherine]'. /// - /// + /// /// Using this key format, the enumerator enumerates model objects of type matching /// . The keys captured during model binding are mapped to the elements /// in the collection to compute the model prefix keys. /// - public class ExplicitIndexCollectionValidationStrategy : IValidationStrategy + internal class ExplicitIndexCollectionValidationStrategy : IValidationStrategy { /// /// Creates a new . diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs index 31d1db97bf..5f79aae6f4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ShortFormDictionaryValidationStrategy.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ShortFormDictionaryValidationStrategy.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { /// /// An implementation of for a dictionary bound with 'short form' style keys. @@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal /// Using this key format, the enumerator enumerates model objects of type . The /// keys of the dictionary are not validated as they must be simple types. /// - public class ShortFormDictionaryValidationStrategy : IValidationStrategy + internal class ShortFormDictionaryValidationStrategy : IValidationStrategy { private readonly ModelMetadata _valueMetadata; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ValidationStack.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationStack.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ValidationStack.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationStack.cs index ba24828544..437573b00d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Internal/ValidationStack.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationStack.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; -using Microsoft.AspNetCore.Mvc.Internal; -namespace Microsoft.AspNetCore.Mvc.ModelBinding.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ValidationStack { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs index 0b277c68c6..2e38d813f5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidationVisitor.cs @@ -5,8 +5,6 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation @@ -30,9 +28,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation public ValidationVisitor( ActionContext actionContext, IModelValidatorProvider validatorProvider, -#pragma warning disable PUB0001 // Pubternal type in public API ValidatorCache validatorCache, -#pragma warning restore PUB0001 IModelMetadataProvider metadataProvider, ValidationStateDictionary validationState) { @@ -64,15 +60,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation protected IModelValidatorProvider ValidatorProvider { get; } protected IModelMetadataProvider MetadataProvider { get; } -#pragma warning disable PUB0001 // Pubternal type in public API + protected ValidatorCache Cache { get; } -#pragma warning restore PUB0001 protected ActionContext Context { get; } protected ModelStateDictionary ModelState { get; } protected ValidationStateDictionary ValidationState { get; } -#pragma warning disable PUB0001 // Pubternal type in public API protected ValidationStack CurrentPath { get; } -#pragma warning restore PUB0001 protected object Container { get; set; } protected string Key { get; set; } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ValidatorCache.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidatorCache.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ValidatorCache.cs rename to src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidatorCache.cs index 61e8303d40..5fadd38e29 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ValidatorCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Validation/ValidatorCache.cs @@ -5,10 +5,8 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ValidatorCache { @@ -16,8 +14,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal public IReadOnlyList GetValidators(ModelMetadata metadata, IModelValidatorProvider validatorProvider) { - CacheEntry entry; - if (_cacheEntries.TryGetValue(metadata, out entry)) + if (_cacheEntries.TryGetValue(metadata, out var entry)) { return GetValidatorsFromEntry(entry, metadata, validatorProvider); } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/MvcCoreDiagnosticSourceExtensions.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs rename to src/Microsoft.AspNetCore.Mvc.Core/MvcCoreDiagnosticSourceExtensions.cs index d5bee24ba7..0d67d5eda7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreDiagnosticSourceExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/MvcCoreDiagnosticSourceExtensions.cs @@ -8,12 +8,12 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc { // We're doing a lot of asserts here because these methods are really tedious to test and // highly dependent on the details of the invoker's state machine. Basically if we wrote the // obvious unit tests that would generate a lot of boilerplate and wouldn't cover the hard parts. - public static class MvcCoreDiagnosticSourceExtensions + internal static class MvcCoreDiagnosticSourceExtensions { public static void BeforeAction( this DiagnosticSource diagnosticSource, diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/MvcCoreLoggerExtensions.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs rename to src/Microsoft.AspNetCore.Mvc.Core/MvcCoreLoggerExtensions.cs index b4a223b8b2..e731b3be50 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcCoreLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/MvcCoreLoggerExtensions.cs @@ -15,14 +15,13 @@ using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc { internal static class MvcCoreLoggerExtensions { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/PhysicalFileResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/PhysicalFileResult.cs index c83dc1442a..27a02b4d94 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/PhysicalFileResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/PhysicalFileResult.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ProducesAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ProducesAttribute.cs index e9346f7330..41d1815bd9 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ProducesAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ProducesAttribute.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs index 14bede0243..af2d56cd8b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs @@ -18,6 +18,7 @@ using Microsoft.AspNetCore.Mvc.Formatters; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.WebApiCompatShim, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Abstractions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ApiExplorer.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] @@ -35,6 +36,7 @@ using Microsoft.AspNetCore.Mvc.Formatters; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Views.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.WebApiCompatShimTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RedirectResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/RedirectResult.cs index 6aae329d12..4fcd46a1d1 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RedirectResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RedirectResult.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToActionResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToActionResult.cs index 7e48ac38c3..06de942c13 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToActionResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToActionResult.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Routing; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToPageResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToPageResult.cs index 4728a4a08c..5f82cd50df 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToPageResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToPageResult.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Routing; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToRouteResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToRouteResult.cs index 500d8f3d2f..8966eab50e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RedirectToRouteResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RedirectToRouteResult.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Routing; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RequestFormLimitsAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/RequestFormLimitsAttribute.cs index d1f1c73578..0681091231 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RequestFormLimitsAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RequestFormLimitsAttribute.cs @@ -6,7 +6,6 @@ using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/RequestSizeLimitAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/RequestSizeLimitAttribute.cs index 95063ff857..a9a6098f65 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/RequestSizeLimitAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/RequestSizeLimitAttribute.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Mvc diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ResponseCacheAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ResponseCacheAttribute.cs index a3e2d6aaf4..a647be106f 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ResponseCacheAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ResponseCacheAttribute.cs @@ -4,7 +4,6 @@ using System; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionConstraintMatcherPolicy.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionConstraintMatcherPolicy.cs index d31e06daf4..f71c3294e3 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionConstraintMatcherPolicy.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionConstraintMatcherPolicy.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Matching; @@ -68,7 +67,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing { // This one is OK, we implement this in endpoint routing. } - else if (actionConstraint.GetType().FullName == "Microsoft.AspNetCore.Mvc.Cors.Internal.CorsHttpMethodActionConstraint") + else if (actionConstraint.GetType().FullName == "Microsoft.AspNetCore.Mvc.Cors.CorsHttpMethodActionConstraint") { // This one is OK, we implement this in endpoint routing. } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRoute.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRoute.cs index 9d307e7e23..da0fc4594e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRoute.cs @@ -14,9 +14,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public class AttributeRoute : IRouter + internal class AttributeRoute : IRouter { private readonly IActionDescriptorCollectionProvider _actionDescriptorCollectionProvider; private readonly IServiceProvider _services; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRouting.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRouting.cs similarity index 91% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRouting.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRouting.cs index e5bf2d5ec4..66804ba63a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRouting.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/AttributeRouting.cs @@ -6,9 +6,9 @@ using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public static class AttributeRouting + internal static class AttributeRouting { /// /// Creates an attribute route using the provided services and provided target router. @@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal return new AttributeRoute( services.GetRequiredService(), services, - actions => + actions => { var handler = services.GetRequiredService(); handler.Actions = actions; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcAttributeRouteHandler.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcAttributeRouteHandler.cs index c40318e2d9..ffc91d11d1 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcAttributeRouteHandler.cs @@ -10,9 +10,9 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public class MvcAttributeRouteHandler : IRouter + internal class MvcAttributeRouteHandler : IRouter { private readonly IActionContextAccessor _actionContextAccessor; private readonly IActionInvokerFactory _actionInvokerFactory; @@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal if (Actions == null) { var message = Resources.FormatPropertyOfTypeCannotBeNull( - nameof(Actions), + nameof(Actions), nameof(MvcAttributeRouteHandler)); throw new InvalidOperationException(message); } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointDataSource.cs similarity index 99% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointDataSource.cs index 8f4612672b..f4b7d895d9 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointDataSource.cs @@ -10,14 +10,15 @@ using System.Threading; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Patterns; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { internal class MvcEndpointDataSource : EndpointDataSource { @@ -648,7 +649,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal metadata.Add(d); } } - + metadata.Add(action); if (dataTokens != null) @@ -733,4 +734,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointInvokerFactory.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointInvokerFactory.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointInvokerFactory.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointInvokerFactory.cs index 3737a3b718..f0d608b168 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointInvokerFactory.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointInvokerFactory.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { internal sealed class MvcEndpointInvokerFactory : IActionInvokerFactory { @@ -38,4 +38,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal return _invokerFactory.CreateInvoker(actionContext); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcRouteHandler.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcRouteHandler.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcRouteHandler.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcRouteHandler.cs index 21903703fa..a4c31e78c8 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcRouteHandler.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcRouteHandler.cs @@ -9,9 +9,9 @@ using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public class MvcRouteHandler : IRouter + internal class MvcRouteHandler : IRouter { private readonly IActionContextAccessor _actionContextAccessor; private readonly IActionInvokerFactory _actionInvokerFactory; @@ -101,4 +101,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal return Task.CompletedTask; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NormalizedRouteValue.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/NormalizedRouteValue.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/NormalizedRouteValue.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/NormalizedRouteValue.cs index 3013ee3171..9258332d0b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NormalizedRouteValue.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/NormalizedRouteValue.cs @@ -4,9 +4,9 @@ using System; using System.Globalization; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public static class NormalizedRouteValue + internal static class NormalizedRouteValue { /// /// Gets the case-normalized route value for the specified route . diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NullRouter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/NullRouter.cs similarity index 93% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/NullRouter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/NullRouter.cs index c1b800c5bd..f359bd1841 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/NullRouter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/NullRouter.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Routing; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { internal class NullRouter : IRouter { @@ -24,4 +24,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal return Task.CompletedTask; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RoutePatternWriter.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/RoutePatternWriter.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/RoutePatternWriter.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/RoutePatternWriter.cs index 3f0e0f6445..5f0e15b376 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/RoutePatternWriter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/RoutePatternWriter.cs @@ -3,11 +3,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using Microsoft.AspNetCore.Routing.Patterns; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { internal static class RoutePatternWriter { @@ -76,4 +75,4 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs index 8e84b081b3..2cea4a9fc7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs @@ -8,7 +8,6 @@ using System.Globalization; using System.Text; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; namespace Microsoft.AspNetCore.Mvc.Routing diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ViewEnginePath.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/ViewEnginePath.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Core/Internal/ViewEnginePath.cs rename to src/Microsoft.AspNetCore.Mvc.Core/Routing/ViewEnginePath.cs index 29d4f85597..f24bdf7eca 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ViewEnginePath.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/ViewEnginePath.cs @@ -7,9 +7,9 @@ using System.Diagnostics; using System.Text; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { - public static class ViewEnginePath + internal static class ViewEnginePath { public static readonly char[] PathSeparators = new[] { '/', '\\' }; private const string CurrentDirectoryToken = "."; @@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal } string result; - + // Get directory name (including final slash) but do not use Path.GetDirectoryName() to preserve path // normalization. var index = first.LastIndexOf('/'); diff --git a/src/Microsoft.AspNetCore.Mvc.Core/SignInResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/SignInResult.cs index 040bbe040d..d7bdfd3867 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/SignInResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/SignInResult.cs @@ -6,7 +6,6 @@ using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/SignOutResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/SignOutResult.cs index f972b9475c..0f69354784 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/SignOutResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/SignOutResult.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Mvc.Core; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/StatusCodeResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/StatusCodeResult.cs index 70de9cdafe..2f367817bd 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/StatusCodeResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/StatusCodeResult.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/VirtualFileResult.cs b/src/Microsoft.AspNetCore.Mvc.Core/VirtualFileResult.cs index 2e37c94a89..b7743795a0 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/VirtualFileResult.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/VirtualFileResult.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.Mvc.Core/breakingchanges.netcore.json index 3fd0e6ddff..b431c5455d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/breakingchanges.netcore.json +++ b/src/Microsoft.AspNetCore.Mvc.Core/breakingchanges.netcore.json @@ -2,5 +2,78 @@ { "TypeId": "public class Microsoft.AspNetCore.Mvc.ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Internal.IApiBehaviorMetadata", "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ConsumesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Internal.IConsumesActionConstraint, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.Formatters.FormatFilter : Microsoft.AspNetCore.Mvc.Formatters.Internal.IFormatFilter, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider", + "MemberId": "protected Microsoft.AspNetCore.Mvc.Internal.PrefixContainer get_PrefixContainer()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.AspNetCore.Mvc.ModelBinding.JQueryValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IKeyRewriterValueProvider", + "MemberId": "protected Microsoft.AspNetCore.Mvc.Internal.PrefixContainer get_PrefixContainer()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.QueryStringValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider", + "MemberId": "protected Microsoft.AspNetCore.Mvc.Internal.PrefixContainer get_PrefixContainer()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.RouteValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider", + "MemberId": "protected Microsoft.AspNetCore.Mvc.Internal.PrefixContainer get_PrefixContainer()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor", + "MemberId": "protected Microsoft.AspNetCore.Mvc.Internal.ValidatorCache get_Cache()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor", + "MemberId": "protected Microsoft.AspNetCore.Mvc.ModelBinding.Internal.ValidationStack get_CurrentPath()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor", + "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.Internal.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerFactory : Microsoft.AspNetCore.Mvc.Controllers.IControllerFactory", + "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator controllerActivator, System.Collections.Generic.IEnumerable propertyActivators)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider : Microsoft.AspNetCore.Mvc.Controllers.IControllerFactoryProvider", + "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.Controllers.IControllerActivatorProvider activatorProvider, Microsoft.AspNetCore.Mvc.Controllers.IControllerFactory controllerFactory, System.Collections.Generic.IEnumerable propertyActivators)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerActivator : Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator", + "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.Internal.ITypeActivatorCache typeActivatorCache)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.AspNetCore.Mvc.ModelBinding.ObjectModelValidator : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator", + "MemberId": "public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor GetValidationVisitor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.Internal.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState)", + "Kind": "Removal" + }, + { + "TypeId": "public struct Microsoft.AspNetCore.Mvc.Formatters.MediaType", + "MemberId": "public static Microsoft.AspNetCore.Mvc.Formatters.Internal.MediaTypeSegmentWithQuality CreateMediaTypeSegmentWithQuality(System.String mediaType, System.Int32 start)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.AspNetCore.Mvc.ModelBinding.ObjectModelValidator : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator", + "MemberId": "public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor GetValidationVisitor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState)", + "Kind": "Addition" } -] \ No newline at end of file +] diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs index 352a8b4ee6..8344a8ca19 100644 --- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs @@ -4,8 +4,8 @@ using System; using System.Linq; using Microsoft.AspNetCore.Cors.Infrastructure; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; namespace Microsoft.AspNetCore.Mvc.Cors.Internal diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs b/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs index de3ff06468..d909180ac2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs +++ b/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs @@ -2,16 +2,14 @@ // 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.Collections.ObjectModel; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.Extensions.Primitives; -using Microsoft.AspNetCore.Mvc.Internal; -namespace Microsoft.AspNetCore.Mvc.Cors.Internal +namespace Microsoft.AspNetCore.Mvc.Cors { // Don't casually change the name of this. We reference the full type name in ActionConstraintCache. - public class CorsHttpMethodActionConstraint : HttpMethodActionConstraint + internal class CorsHttpMethodActionConstraint : HttpMethodActionConstraint { private readonly string OriginHeader = "Origin"; private readonly string AccessControlRequestMethod = "Access-Control-Request-Method"; diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Cors/Properties/AssemblyInfo.cs index 19603aa2df..5a3d62d5ad 100644 --- a/src/Microsoft.AspNetCore.Mvc.Cors/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Cors/Properties/AssemblyInfo.cs @@ -3,4 +3,6 @@ using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Cors.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs index 332d1bdc59..7a0eae64e2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs @@ -6,7 +6,6 @@ using System.Buffers; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Net.Http.Headers; diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs index f0954c36a4..b3c6e52b2b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs @@ -14,7 +14,7 @@ using System.Xml; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.WebUtilities; namespace Microsoft.AspNetCore.Mvc.Formatters diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs index 4d530a015b..77f37c740c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs +++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs @@ -14,7 +14,7 @@ using System.Xml.Serialization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.WebUtilities; namespace Microsoft.AspNetCore.Mvc.Formatters diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultTagHelperActivator.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Infrastructure/DefaultTagHelperActivator.cs similarity index 89% rename from src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultTagHelperActivator.cs rename to src/Microsoft.AspNetCore.Mvc.Razor/Infrastructure/DefaultTagHelperActivator.cs index c52a77a2eb..8146ca0758 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultTagHelperActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/Infrastructure/DefaultTagHelperActivator.cs @@ -2,16 +2,16 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Razor.TagHelpers; -namespace Microsoft.AspNetCore.Mvc.Razor.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.Infrastructure { /// /// Default implementation of . /// - public class DefaultTagHelperActivator : ITagHelperActivator + internal class DefaultTagHelperActivator : ITagHelperActivator { private readonly ITypeActivatorCache _typeActivatorCache; @@ -43,4 +43,4 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal typeof(TTagHelper)); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/LanguageViewLocationExpander.cs b/src/Microsoft.AspNetCore.Mvc.Razor/LanguageViewLocationExpander.cs index 1ed92110bc..94338ef371 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/LanguageViewLocationExpander.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/LanguageViewLocationExpander.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor } /// - /// Instantiates a new instance. + /// Instantiates a new instance. /// /// The . public LanguageViewLocationExpander(LanguageViewLocationExpanderFormat format) @@ -112,4 +112,4 @@ namespace Microsoft.AspNetCore.Mvc.Razor } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/RazorViewEngine.cs b/src/Microsoft.AspNetCore.Mvc.Razor/RazorViewEngine.cs index 8d929fb883..145f2fc6b2 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/RazorViewEngine.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/RazorViewEngine.cs @@ -7,8 +7,8 @@ using System.Diagnostics; using System.Globalization; using System.Linq; using System.Text.Encodings.Web; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Razor.Internal; +using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewEngines; using Microsoft.AspNetCore.Razor.Language; using Microsoft.Extensions.Caching.Memory; diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/Builder/RazorPagesEndpointRouteBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/Builder/RazorPagesEndpointRouteBuilderExtensions.cs index bb69573b7e..677a426f34 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/Builder/RazorPagesEndpointRouteBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/Builder/RazorPagesEndpointRouteBuilderExtensions.cs @@ -1,14 +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. -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionInvoker.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionInvoker.cs index 4f91b0346e..d616d223e0 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionInvoker.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionInvoker.cs @@ -21,7 +21,7 @@ using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal { - public class PageActionInvoker : ResourceInvoker, IActionInvoker + internal class PageActionInvoker : ResourceInvoker, IActionInvoker { private readonly IPageHandlerMethodSelector _selector; private readonly PageContext _pageContext; diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/PageBase.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/PageBase.cs index 3dda563ebb..1d43071cf7 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/PageBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/PageBase.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Rendering; diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/PageModel.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/PageModel.cs index 17384ca1ce..630084b897 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/PageModel.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/PageModel.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure; using Microsoft.AspNetCore.Mvc.Routing; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewFeaturesMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewFeaturesMvcCoreBuilderExtensions.cs index ebedcbc56c..3db9a88249 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewFeaturesMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewFeaturesMvcCoreBuilderExtensions.cs @@ -7,9 +7,9 @@ using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewComponents; using Microsoft.AspNetCore.Mvc.ViewEngines; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/TempDataApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/TempDataApplicationModelProvider.cs index 7a111b4919..47e30591e3 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/TempDataApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/TempDataApplicationModelProvider.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; using Microsoft.Extensions.Options; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/ViewDataAttributeApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/ViewDataAttributeApplicationModelProvider.cs index 3237558537..fa2f8eb052 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/ViewDataAttributeApplicationModelProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/ViewDataAttributeApplicationModelProvider.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; namespace Microsoft.AspNetCore.Mvc.ViewFeatures diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Properties/AssemblyInfo.cs index c49b597b20..c0dae432e0 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Properties/AssemblyInfo.cs @@ -4,5 +4,7 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Views.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs index 119ba657a3..c30ec32cdc 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs @@ -7,7 +7,6 @@ using System.ComponentModel.DataAnnotations; using System.Globalization; using System.Linq; using Microsoft.AspNetCore.Mvc.DataAnnotations; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentActivator.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentActivator.cs index ee04bc53b6..7dc4755f81 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/DefaultViewComponentActivator.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.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ViewFeatures; namespace Microsoft.AspNetCore.Mvc.ViewComponents @@ -25,9 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewComponents /// /// The used to create new view component instances. /// -#pragma warning disable PUB0001 // Pubternal type in public API public DefaultViewComponentActivator(ITypeActivatorCache typeActivatorCache) -#pragma warning restore PUB0001 { if (typeActivatorCache == null) { @@ -74,11 +72,10 @@ namespace Microsoft.AspNetCore.Mvc.ViewComponents throw new InvalidOperationException(nameof(viewComponent)); } - var disposable = viewComponent as IDisposable; - if (disposable != null) + if (viewComponent is IDisposable disposable) { disposable.Dispose(); } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/ViewComponentInvokerCache.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/ViewComponentInvokerCache.cs index e19a2673c5..96316b3903 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/ViewComponentInvokerCache.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponents/ViewComponentInvokerCache.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Concurrent; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ViewComponents; using Microsoft.Extensions.Internal; @@ -42,8 +42,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal var cache = CurrentCache; var viewComponentDescriptor = viewComponentContext.ViewComponentDescriptor; - ObjectMethodExecutor executor; - if (cache.Entries.TryGetValue(viewComponentDescriptor, out executor)) + if (cache.Entries.TryGetValue(viewComponentDescriptor, out var executor)) { return executor; } diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultHtmlGenerator.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultHtmlGenerator.cs index d0121241b6..7504156c68 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultHtmlGenerator.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultHtmlGenerator.cs @@ -13,7 +13,6 @@ using System.Text.Encodings.Web; using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultValidationHtmlAttributeProvider.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultValidationHtmlAttributeProvider.cs index 02b04d8e53..b141321bfb 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultValidationHtmlAttributeProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/DefaultValidationHtmlAttributeProvider.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Rendering; @@ -30,9 +29,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures public DefaultValidationHtmlAttributeProvider( IOptions optionsAccessor, IModelMetadataProvider metadataProvider, -#pragma warning disable PUB0001 // Pubternal type in public API ClientValidatorCache clientValidatorCache -#pragma warning restore PUB0001 ) { if (optionsAccessor == null) diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewComponentResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewComponentResultExecutor.cs index 164de35ba1..69c8ffaff7 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewComponentResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewComponentResultExecutor.cs @@ -5,8 +5,8 @@ using System; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; +using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewDataDictionaryControllerPropertyActivator.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewDataDictionaryControllerPropertyActivator.cs index 352c4aba5b..c3c34d4cfc 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewDataDictionaryControllerPropertyActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewDataDictionaryControllerPropertyActivator.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Concurrent; using System.Threading; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Internal; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewExecutor.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewExecutor.cs index 748a9c94b7..054b67d4d6 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewExecutor.cs @@ -5,8 +5,8 @@ using System; using System.Diagnostics; using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewEngines; diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/breakingchanges.netcore.json new file mode 100644 index 0000000000..4b0e23da35 --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/breakingchanges.netcore.json @@ -0,0 +1,16 @@ +[ + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionaryControllerPropertyActivator : Microsoft.AspNetCore.Mvc.Internal.IControllerPropertyActivator", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentActivator : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator", + "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.Internal.ITypeActivatorCache typeActivatorCache)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultValidationHtmlAttributeProvider : Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider", + "MemberId": "public .ctor(Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache clientValidatorCache)", + "Kind": "Removal" + } +] \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs b/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs index 95b4168a9a..923bd75192 100644 --- a/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs +++ b/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Conventions/WebApiActionConventionsApplicationModelConvention.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.WebApiCompatShim { diff --git a/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj b/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj index 72cb71f8c2..2396f53372 100644 --- a/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj +++ b/src/Microsoft.AspNetCore.Mvc.WebApiCompatShim/Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj @@ -16,7 +16,6 @@ System.Web.Http.ApiController - diff --git a/test/Microsoft.AspNetCore.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs b/test/Microsoft.AspNetCore.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs index 75a01945d2..f9a8f0bc2e 100644 --- a/test/Microsoft.AspNetCore.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Options; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs index d990cdd2ff..8f3029a647 100644 --- a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs index 81f17cb58b..d69609e3a4 100644 --- a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs @@ -16,7 +16,7 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; using Microsoft.AspNetCore.Mvc.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedAtActionResultTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedAtActionResultTests.cs index 242405e9ba..721b58ca9b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedAtActionResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedAtActionResultTests.cs @@ -2,14 +2,12 @@ // 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 System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; @@ -17,7 +15,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; -using Newtonsoft.Json; using Xunit; namespace Microsoft.AspNetCore.Mvc diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedResultTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedResultTests.cs index 8c32191534..07ca76072e 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/AcceptedResultTests.cs @@ -2,20 +2,16 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Buffers; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; -using Newtonsoft.Json; using Xunit; namespace Microsoft.AspNetCore.Mvc.Core.Test diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionConstraintCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/ActionConstraintCacheTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionConstraintCacheTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/ActionConstraintCacheTest.cs index c4374a5bbb..5b9fd44387 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionConstraintCacheTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/ActionConstraintCacheTest.cs @@ -5,13 +5,12 @@ using System; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { public class ActionConstraintCacheTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/HttpMethodActionConstraintTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/HttpMethodActionConstraintTest.cs index bb6354fe4c..cbb34315e9 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/HttpMethodActionConstraintTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ActionConstraints/HttpMethodActionConstraintTest.cs @@ -4,12 +4,11 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Primitives; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ActionConstraints { public class HttpMethodActionConstraintTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ActionModelTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ActionModelTest.cs index 8a43002db1..662b6ef787 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ActionModelTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ActionModelTest.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Reflection; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ApiBehaviorApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ApiBehaviorApplicationModelProviderTest.cs index 12c4984cf5..6abbe2b59c 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ApiBehaviorApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ApiBehaviorApplicationModelProviderTest.cs @@ -5,7 +5,6 @@ using System; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/AuthorizationApplicationModelProviderTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/AuthorizationApplicationModelProviderTest.cs index 866f13e461..0e1f46a760 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AuthorizationApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/AuthorizationApplicationModelProviderTest.cs @@ -7,14 +7,13 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Infrastructure; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Authorization; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { public class AuthorizationApplicationModelProviderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ConsumesConstraintForFormFileParameterConventionTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ConsumesConstraintForFormFileParameterConventionTest.cs index 9f7d07402a..660086f1b7 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ConsumesConstraintForFormFileParameterConventionTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ConsumesConstraintForFormFileParameterConventionTest.cs @@ -4,7 +4,6 @@ using System; using System.Reflection; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Options; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorBuilderTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorBuilderTest.cs index 17e5325d91..b4405ef2ac 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorBuilderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorBuilderTest.cs @@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.ModelBinding; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { public class ControllerActionDescriptorBuilderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorProviderTests.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorProviderTests.cs index e35f55a9d9..2942431599 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionDescriptorProviderTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerActionDescriptorProviderTests.cs @@ -8,8 +8,6 @@ using System.Reflection; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; @@ -20,7 +18,7 @@ using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { public class ControllerActionDescriptorProviderTests { @@ -815,7 +813,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal "HTTP Verbs: ''" + Environment.NewLine + $"Action: '{controllerTypeInfo.FullName}.GetUser ({assemblyName})' " + - "- Route Template: 'Microsoft/AspNetCore/Mvc/Internal/User/GetUser/{id?}' - " + + "- Route Template: 'Microsoft/AspNetCore/Mvc/ApplicationModels/User/GetUser/{id?}' - " + "HTTP Verbs: ''" + Environment.NewLine + Environment.NewLine + "Use 'AcceptVerbsAttribute' to create a single route that allows multiple HTTP verbs and defines a " + diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerModelTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerModelTest.cs index dc19724cd6..bd16a8ccd3 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerModelTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/ControllerModelTest.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Reflection; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/DefaultApplicationModelProviderTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/DefaultApplicationModelProviderTest.cs index 98e358cabc..8d89b668bd 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/DefaultApplicationModelProviderTest.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.ApplicationModels; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; @@ -15,7 +15,7 @@ using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Options; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ApplicationModels { public class DefaultApplicationModelProviderTest { @@ -1734,31 +1734,6 @@ namespace Microsoft.AspNetCore.Mvc.Internal : base(Options.Create(options), modelMetadataProvider) { } - - public new ControllerModel CreateControllerModel(TypeInfo typeInfo) - { - return base.CreateControllerModel(typeInfo); - } - - public new ActionModel CreateActionModel(TypeInfo typeInfo, MethodInfo methodInfo) - { - return base.CreateActionModel(typeInfo, methodInfo); - } - - public new PropertyModel CreatePropertyModel(PropertyInfo propertyInfo) - { - return base.CreatePropertyModel(propertyInfo); - } - - public new bool IsAction(TypeInfo typeInfo, MethodInfo methodInfo) - { - return base.IsAction(typeInfo, methodInfo); - } - - public new ParameterModel CreateParameterModel(ParameterInfo parameterInfo) - { - return base.CreateParameterModel(parameterInfo); - } } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/InferParameterBindingInfoConventionTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/InferParameterBindingInfoConventionTest.cs index 8b82f3d6ad..0f6527f363 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/InferParameterBindingInfoConventionTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationModels/InferParameterBindingInfoConventionTest.cs @@ -9,7 +9,6 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Builder/MvcApplicationBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Builder/MvcApplicationBuilderExtensionsTest.cs index 1d69fd9d5e..6bceeb51d0 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Builder/MvcApplicationBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Builder/MvcApplicationBuilderExtensionsTest.cs @@ -7,7 +7,7 @@ using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder.Internal; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs index 1ecf35fb8e..64b97cd1f8 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; using Microsoft.Net.Http.Headers; @@ -429,7 +428,7 @@ namespace Microsoft.AspNetCore.Mvc return httpContext; } - public interface ITestActionConsumeConstraint : IConsumesActionConstraint, IResourceFilter + internal interface ITestActionConsumeConstraint : IConsumesActionConstraint, IResourceFilter { } } diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ContentResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ContentResultTest.cs index 6fd9433aa0..a9b044cb2c 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ContentResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ContentResultTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ControllerBaseTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ControllerBaseTest.cs index 659260734a..89a38e587a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ControllerBaseTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ControllerBaseTest.cs @@ -10,9 +10,7 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.DataAnnotations; -using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerActivatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerActivatorProviderTest.cs index 0f224078b2..e6af45f3b7 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerActivatorProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerActivatorProviderTest.cs @@ -4,7 +4,7 @@ using System; using System.Reflection; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerBinderDelegateProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerBinderDelegateProviderTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerBinderDelegateProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerBinderDelegateProviderTest.cs index a666abd913..e01d0d5880 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerBinderDelegateProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerBinderDelegateProviderTest.cs @@ -24,7 +24,7 @@ using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Controllers { public class ControllerBinderDelegateProviderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerFactoryProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerFactoryProviderTest.cs index 00f4492239..d8a7ed6c7f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerFactoryProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/ControllerFactoryProviderTest.cs @@ -4,7 +4,6 @@ using System; using System.Linq; using System.Reflection; -using Microsoft.AspNetCore.Mvc.Internal; using Moq; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs index 2e72325feb..01bbb8af06 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerActivatorTest.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Reflection; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs index 3a705e334e..ec2770bb93 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Controllers/DefaultControllerFactoryTest.cs @@ -4,7 +4,7 @@ using System; using System.Reflection; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Moq; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtActionResultTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtActionResultTests.cs index 5c21c139fc..a461f42d85 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtActionResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtActionResultTests.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtRouteResultTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtRouteResultTests.cs index 9f19dc1794..9e7cf1df9f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtRouteResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedAtRouteResultTests.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedResultTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedResultTests.cs index 84de33aed6..daa982e53f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/CreatedResultTests.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ApiBehaviorOptionsSetupTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApiBehaviorOptionsSetupTest.cs similarity index 90% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ApiBehaviorOptionsSetupTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApiBehaviorOptionsSetupTest.cs index 4ae53cd4d7..4255b344ea 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ApiBehaviorOptionsSetupTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApiBehaviorOptionsSetupTest.cs @@ -5,12 +5,12 @@ using System; using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Logging.Abstractions; -using Microsoft.Extensions.Options; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.Extensions.DependencyInjection { public class ApiBehaviorOptionsSetupTest { @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // Arrange var optionsSetup = new ApiBehaviorOptionsSetup( NullLoggerFactory.Instance, - Options.Create(new MvcCompatibilityOptions())); + Options.Options.Create(new MvcCompatibilityOptions())); var options = new ApiBehaviorOptions(); // Act @@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal var expected = new[] { 400, 401, 403, 404, 406, 409, 415, 422, }; var optionsSetup = new ApiBehaviorOptionsSetup( NullLoggerFactory.Instance, - Options.Create(new MvcCompatibilityOptions())); + Options.Options.Create(new MvcCompatibilityOptions())); var options = new ApiBehaviorOptions(); // Act @@ -53,7 +53,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // Arrange var optionsSetup = new ApiBehaviorOptionsSetup( NullLoggerFactory.Instance, - Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Latest })); + Options.Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Latest })); var options = new ApiBehaviorOptions(); // Act @@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // Arrange var optionsSetup = new ApiBehaviorOptionsSetup( NullLoggerFactory.Instance, - Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Version_2_1 })); + Options.Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Version_2_1 })); var options = new ApiBehaviorOptions(); // Act @@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // Arrange var optionsSetup = new ApiBehaviorOptionsSetup( NullLoggerFactory.Instance, - Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Latest })); + Options.Options.Create(new MvcCompatibilityOptions { CompatibilityVersion = CompatibilityVersion.Latest })); var options = new ApiBehaviorOptions(); Func expected = _ => null; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApplicationModelConventionExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApplicationModelConventionExtensionsTest.cs index 51811324e8..5ef954003c 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApplicationModelConventionExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/ApplicationModelConventionExtensionsTest.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Reflection; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Xunit; namespace Microsoft.Extensions.DependencyInjection diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcBuilderExtensionsTest.cs index 9ef4358c3f..6d7fd73b51 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcBuilderExtensionsTest.cs @@ -1,12 +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. -using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.MvcServiceCollectionExtensionsTestControllers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreBuilderExtensionsTest.cs index 2311cb3987..1f37d86316 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreBuilderExtensionsTest.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Moq; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreServiceCollectionExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreServiceCollectionExtensionsTest.cs index ee3b28f076..e89e151509 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreServiceCollectionExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/DependencyInjection/MvcCoreServiceCollectionExtensionsTest.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DisableRequestSizeLimitFilterTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/DisableRequestSizeLimitFilterTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DisableRequestSizeLimitFilterTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/DisableRequestSizeLimitFilterTest.cs index 6e8907f1a5..0ea66617f8 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DisableRequestSizeLimitFilterTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/DisableRequestSizeLimitFilterTest.cs @@ -4,13 +4,12 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Testing; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class DisableRequestSizeLimitFilterTest { @@ -147,4 +146,3 @@ namespace Microsoft.AspNetCore.Mvc.Internal } } } - diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterFactoryTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterFactoryTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterFactoryTest.cs index d382bd386e..366a59cb5b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterFactoryTest.cs @@ -4,11 +4,10 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class FilterFactoryTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterProviderTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterProviderTest.cs index 5d9876a3c4..8639542ab7 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/FilterProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/FilterProviderTest.cs @@ -6,12 +6,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class DefaultFilterProviderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterAttributeTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterAttributeTest.cs index bcfec63de6..801bcb3a8b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterAttributeTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterAttributeTest.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Builder.Internal; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class MiddlewareFilterAttributeTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterBuilderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterBuilderTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterBuilderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterBuilderTest.cs index c9c30d2f85..2802d65512 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterBuilderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterBuilderTest.cs @@ -16,7 +16,7 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class MiddlewareFilterBuilderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterConfigurationProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterConfigurationProviderTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterConfigurationProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterConfigurationProviderTest.cs index 694606d8ce..fb55e04bcd 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterConfigurationProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterConfigurationProviderTest.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class MiddlewareFilterConfigurationProviderTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterTest.cs index 5edff31ab3..813c23fe38 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MiddlewareFilterTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/MiddlewareFilterTest.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Builder.Internal; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; @@ -25,7 +24,7 @@ using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class MiddlewareFilterTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestFormLimitsFilterTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestFormLimitsFilterTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestFormLimitsFilterTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestFormLimitsFilterTest.cs index 7b1234092b..9d7b467f67 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestFormLimitsFilterTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestFormLimitsFilterTest.cs @@ -4,14 +4,13 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Testing; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class RequestFormLimitsFilterTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestSizeLimitFilterTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestSizeLimitFilterTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestSizeLimitFilterTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestSizeLimitFilterTest.cs index 80be3c2e9a..3d3ec36ed5 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RequestSizeLimitFilterTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/RequestSizeLimitFilterTest.cs @@ -4,13 +4,12 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Testing; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class RequestSizeLimitFilterTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseCacheFilterExecutorTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/ResponseCacheFilterExecutorTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseCacheFilterExecutorTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/ResponseCacheFilterExecutorTest.cs index 93969159db..2ed860f0a8 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseCacheFilterExecutorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Filters/ResponseCacheFilterExecutorTest.cs @@ -5,14 +5,12 @@ using System; using System.Collections.Generic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.ResponseCaching; using Microsoft.AspNetCore.Routing; using Microsoft.Net.Http.Headers; -using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Filters { public class ResponseCacheFilterExecutorTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs index 9953e32ec2..9c2bd05c5c 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AcceptHeaderParserTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/AcceptHeaderParserTest.cs @@ -1,13 +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.Linq; using Microsoft.Extensions.Primitives; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Formatters.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { public class AcceptHeaderParserTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseContentTypeHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/ResponseContentTypeHelperTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseContentTypeHelperTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/ResponseContentTypeHelperTest.cs index d7898089b8..6895f55288 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ResponseContentTypeHelperTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Formatters/ResponseContentTypeHelperTest.cs @@ -5,7 +5,7 @@ using System.Text; using Microsoft.Net.Http.Headers; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Formatters { public class ResponseContentTypeHelperTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs index 6168694207..9bd11f8ab0 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpNotFoundObjectResultTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpOkObjectResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpOkObjectResultTest.cs index db4d71f11f..a6e6a4f99c 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpOkObjectResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/HttpOkObjectResultTest.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionMethodExecutorTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionMethodExecutorTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionMethodExecutorTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionMethodExecutorTest.cs index 8e3f8c37e0..aa40fb873a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionMethodExecutorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionMethodExecutorTest.cs @@ -4,12 +4,10 @@ using System; using System.Reflection; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Internal; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Core.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class ActionMethodExecutorTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionResultTypeMapperTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionResultTypeMapperTest.cs similarity index 95% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionResultTypeMapperTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionResultTypeMapperTest.cs index 3b4d3a0f4d..a21b509be2 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionResultTypeMapperTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionResultTypeMapperTest.cs @@ -1,11 +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. -using Microsoft.AspNetCore.Mvc.Infrastructure; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class ActionResultTypeMapperTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionSelectorTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionSelectorTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionSelectorTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionSelectorTest.cs index 214c6eebb7..47da34e7ef 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ActionSelectorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ActionSelectorTest.cs @@ -8,9 +8,9 @@ using System.Reflection; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerCacheTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerCacheTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerCacheTest.cs index 247206469f..3b914cc092 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerCacheTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerCacheTest.cs @@ -7,17 +7,15 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class ControllerActionInvokerCacheTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerTest.cs index 74090a932c..03e70b7f9e 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ControllerActionInvokerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ControllerActionInvokerTest.cs @@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; @@ -22,12 +21,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using Microsoft.Extensions.Logging.Testing; using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class ControllerActionInvokerTest : CommonResourceInvokerTest { @@ -1454,7 +1452,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal #endregion - protected override ResourceInvoker CreateInvoker( + protected override IActionInvoker CreateInvoker( IFilterMetadata[] filters, Exception exception = null, IActionResult result = null, diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/NonDisposableStreamTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/NonDisposableStreamTest.cs similarity index 95% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/NonDisposableStreamTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/NonDisposableStreamTest.cs index 0eb5d7014f..942119d8d1 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/NonDisposableStreamTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/NonDisposableStreamTest.cs @@ -3,9 +3,10 @@ using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class NonDisposableStreamTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ParameterDefaultValuesTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ParameterDefaultValuesTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ParameterDefaultValuesTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ParameterDefaultValuesTest.cs index 0b9b2f7880..befe46a23f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ParameterDefaultValuesTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/ParameterDefaultValuesTest.cs @@ -5,7 +5,7 @@ using System; using System.ComponentModel; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Infrastructure { public class ParameterDefaultValuesTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ArrayModelBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ArrayModelBinderTest.cs index d3efdd8775..2e5143fd7f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ArrayModelBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ArrayModelBinderTest.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.Extensions.Logging.Abstractions; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/BinderTypeModelBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/BinderTypeModelBinderTest.cs index 2dee3bbf02..5f9110b769 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/BinderTypeModelBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/BinderTypeModelBinderTest.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; using Moq; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/CollectionModelBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/CollectionModelBinderTest.cs index bc9cdf1981..341947bf35 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/CollectionModelBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/CollectionModelBinderTest.cs @@ -8,8 +8,6 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging.Abstractions; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ComplexTypeModelBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ComplexTypeModelBinderTest.cs index 32314d7306..b5f38b9322 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ComplexTypeModelBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/ComplexTypeModelBinderTest.cs @@ -10,7 +10,6 @@ using System.Reflection; using System.Runtime.Serialization; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/DictionaryModelBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/DictionaryModelBinderTest.cs index db059c0090..98f50a11bf 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/DictionaryModelBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/DictionaryModelBinderTest.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Primitives; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/HeaderModelBinderTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/HeaderModelBinderTests.cs index 2b750fd67f..4b4c019ea6 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/HeaderModelBinderTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Binders/HeaderModelBinderTests.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/CompositeValueProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/CompositeValueProviderTest.cs index 0da5681ef6..611acad7f1 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/CompositeValueProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/CompositeValueProviderTest.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.Primitives; using Moq; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs similarity index 92% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs index 9b069dae76..c2c6418273 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ElementalValueProviderTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ElementalValueProviderTests.cs @@ -1,13 +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. -using System; using System.Globalization; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.ModelBinding; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { public class ElementalValueProviderTest { @@ -16,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal [InlineData("MyProperty.SubProperty", "MyProperty")] [InlineData("MyProperty[0]", "MyProperty")] public void ContainsPrefix_ReturnsTrue_IfElementNameStartsWithPrefix( - string elementName, + string elementName, string prefix) { // Arrange @@ -38,7 +35,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal [InlineData("MyPropertyTest", "MyProperty")] [InlineData("Random", "MyProperty")] public void ContainsPrefix_ReturnsFalse_IfElementCannotSpecifyValuesForPrefix( - string elementName, + string elementName, string prefix) { // Arrange diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs index 7464e6203a..727cd31705 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultBindingMetadataProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultBindingMetadataProviderTest.cs @@ -3,12 +3,10 @@ using System; using System.Reflection; -using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; -using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata { public class DefaultModelMetadataBindingDetailsProviderTest { @@ -700,7 +698,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal .GetMethod(nameof(ParameterInfos.Method)) .GetParameters()[0]; } - + private class CustomAttribute : Attribute { public string Identifier { get; set; } diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs index 3352890707..cace016898 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultModelMetadataTest.cs @@ -8,7 +8,6 @@ using System.Collections.ObjectModel; using System.Linq; using System.Reflection; using System.Xml; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Moq; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs index d7299a1a3b..4c1c73544f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/DefaultValidationMetadataProviderTest.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs index 394a55c6fa..84ac75ffc0 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Metadata/EmptyCompositeMetadataDetailsProvider.cs @@ -1,11 +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. -using Microsoft.AspNetCore.Mvc.Internal; - namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata { - public class EmptyCompositeMetadataDetailsProvider : DefaultCompositeMetadataDetailsProvider + internal class EmptyCompositeMetadataDetailsProvider : DefaultCompositeMetadataDetailsProvider { public EmptyCompositeMetadataDetailsProvider() : base(new IMetadataDetailsProvider[0]) diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBinderFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBinderFactoryTest.cs index 58a2d9a841..e069f67601 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBinderFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBinderFactoryTest.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.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs index eab8c6a860..6f858059ff 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ModelBindingHelperTest.cs @@ -10,10 +10,7 @@ using System.Linq.Expressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.DataAnnotations; -using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs index 9464e6def7..ae1e56705e 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.DataAnnotations; using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/PrefixContainerTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/PrefixContainerTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/PrefixContainerTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/PrefixContainerTest.cs index 91d925bdab..78ce08be61 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/PrefixContainerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/PrefixContainerTest.cs @@ -5,7 +5,7 @@ using System; using System.Linq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { public class PrefixContainerTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ReferenceEqualityComparerTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ReferenceEqualityComparerTest.cs index 956e34ad4c..6343865578 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ReferenceEqualityComparerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ReferenceEqualityComparerTest.cs @@ -4,7 +4,7 @@ using System; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding { public class ReferenceEqualityComparerTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/StubModelBinder.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/StubModelBinder.cs index 790780b0e9..b0d19eaa56 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/StubModelBinder.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/StubModelBinder.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.ModelBinding { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ClientValidatorCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs similarity index 96% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ClientValidatorCacheTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs index 642eb82ea0..8cd31aec36 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ClientValidatorCacheTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs @@ -5,11 +5,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.AspNetCore.Mvc.DataAnnotations; using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ClientValidatorCacheTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs similarity index 96% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs index 30f964b93d..ee0eb39de6 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultCollectionValidationStrategyTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultCollectionValidationStrategyTest.cs @@ -5,11 +5,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class DefaultCollectionValidationStrategyTest { @@ -28,7 +26,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal // Assert Assert.Collection( BufferEntries(enumerator).OrderBy(e => e.Key), - e => + e => { Assert.Equal("prefix[0]", e.Key); Assert.Equal(2, e.Model); diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs index 9ed691d26d..ed4cb6ad42 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultComplexObjectValidationStrategyTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultComplexObjectValidationStrategyTest.cs @@ -4,11 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class DefaultComplexObjectValidationStrategyTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs index 83cf64890a..bbf040d4ea 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/DefaultObjectValidatorTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultObjectValidatorTests.cs @@ -10,16 +10,14 @@ using System.Reflection; using System.Text; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class DefaultObjectValidatorTests { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs index cf1fecf8f3..8d09ea153a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ExplicitIndexCollectionValidationStrategyTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ExplicitIndexCollectionValidationStrategyTest.cs @@ -5,12 +5,10 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ExplicitIndexCollectionValidationStrategyTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs index 9ef857f0a1..c002652857 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ShortFormDictionaryValidationStrategyTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ShortFormDictionaryValidationStrategyTest.cs @@ -3,11 +3,9 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ShortFormDictionaryValidationStrategyTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Internal/ValidationStackTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidationStackTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Internal/ValidationStackTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidationStackTest.cs index b68337cea8..64c4201855 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Internal/ValidationStackTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidationStackTest.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Xunit; -namespace Microsoft.AspNetCore.Mvc.ModelBinding.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ValidationStackTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ValidatorCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs similarity index 96% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ValidatorCacheTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs index 57bf369b9b..f92c79f84d 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ValidatorCacheTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs @@ -5,11 +5,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.AspNetCore.Mvc.DataAnnotations; using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { public class ValidatorCacheTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcCoreLoggerExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/MvcCoreLoggerExtensionsTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcCoreLoggerExtensionsTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/MvcCoreLoggerExtensionsTest.cs index 2b56c00572..ae6987a4c4 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcCoreLoggerExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/MvcCoreLoggerExtensionsTest.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging.Testing; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc { public class MvcCoreLoggerExtensionsTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ProducesAttributeTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ProducesAttributeTests.cs index 4c3e9ae7a3..758b965f04 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ProducesAttributeTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ProducesAttributeTests.cs @@ -7,13 +7,13 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Formatters.Internal; +using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Primitives; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Test +namespace Microsoft.AspNetCore.Mvc { public class ProducesAttributeTests { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToActionResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToActionResultTest.cs index 28a5976c9b..40e70c447a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToActionResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToActionResultTest.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToRouteResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToRouteResultTest.cs index 6b0de7b699..f747a2ba53 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToRouteResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/RedirectToRouteResultTest.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ResponseCacheAttributeTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ResponseCacheAttributeTest.cs index c8d3921444..242af7b3eb 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ResponseCacheAttributeTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ResponseCacheAttributeTest.cs @@ -7,7 +7,6 @@ using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.ResponseCaching; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRouteTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRouteTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRouteTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRouteTest.cs index a11448fe7e..bb069a6c78 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRouteTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRouteTest.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Template; using Microsoft.AspNetCore.Routing.Tree; @@ -19,7 +18,7 @@ using Microsoft.Extensions.ObjectPool; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { public class AttributeRouteTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRoutingTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRoutingTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRoutingTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRoutingTest.cs index 4c475cadad..692d63743a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/AttributeRoutingTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/AttributeRoutingTest.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; @@ -19,7 +18,7 @@ using Microsoft.Extensions.Options; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { public class AttributeRoutingTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs index 103b4ad14b..92bd76ae02 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/KnownRouteValueConstraintTests.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcEndpointDataSourceTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcEndpointDataSourceTests.cs similarity index 99% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcEndpointDataSourceTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcEndpointDataSourceTests.cs index d354543cc6..3fcbcc9d1b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/MvcEndpointDataSourceTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcEndpointDataSourceTests.cs @@ -12,16 +12,13 @@ using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.Routing.Matching; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { public class MvcEndpointDataSourceTests { @@ -760,7 +757,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal var dataSource = CreateMvcEndpointDataSource(actionDescriptorCollection); dataSource.ConventionalEndpointInfos.Add( CreateEndpointInfo( - string.Empty, + string.Empty, "{controller=Home}/{action=Index}/{subscription=general}", defaults: new RouteValueDictionary(new { subarea = "test", }))); @@ -1279,7 +1276,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal var routeValuesAddress = matcherEndpoint.Metadata.GetMetadata(); Assert.Equal("TESTACTION", routeValuesAddress.RequiredValues["action"]); - + }, (ep) => { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/MvcRouteHandlerTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcRouteHandlerTests.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/MvcRouteHandlerTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcRouteHandlerTests.cs index 0efa991841..b13958aa0a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Infrastructure/MvcRouteHandlerTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/MvcRouteHandlerTests.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging.Testing; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Infrastructure +namespace Microsoft.AspNetCore.Mvc.Routing { public class MvcRouteHandlerTests { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RoutePatternWriterTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/RoutePatternWriterTests.cs similarity index 92% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RoutePatternWriterTests.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/RoutePatternWriterTests.cs index c403213b72..b7c1a9213b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/RoutePatternWriterTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/RoutePatternWriterTests.cs @@ -2,11 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing.Patterns; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Core.Test.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { public class RoutePatternWriterTests { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ViewEnginePathTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/ViewEnginePathTest.cs similarity index 97% rename from test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ViewEnginePathTest.cs rename to test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/ViewEnginePathTest.cs index e76e274b82..cb95480328 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ViewEnginePathTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/ViewEnginePathTest.cs @@ -3,7 +3,7 @@ using Xunit; -namespace Microsoft.AspNetCore.Mvc.Internal +namespace Microsoft.AspNetCore.Mvc.Routing { public class ViewEnginePathTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/CommonResourceInvokerTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/CommonResourceInvokerTest.cs index ed4e80c7ff..ae73ee2621 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/CommonResourceInvokerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/CommonResourceInvokerTest.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Testing; using Moq; @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Mvc // Intentionally choosing an uncommon exception type. protected static readonly Exception Exception = new DivideByZeroException(); - protected ResourceInvoker CreateInvoker( + protected IActionInvoker CreateInvoker( IFilterMetadata filter, Exception exception = null, IActionResult result = null, @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Mvc return CreateInvoker(new IFilterMetadata[] { filter }, exception, result, valueProviderFactories); } - protected abstract ResourceInvoker CreateInvoker( + protected abstract IActionInvoker CreateInvoker( IFilterMetadata[] filters, Exception exception = null, IActionResult result = null, diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/SimpleValueProviderFactory.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/SimpleValueProviderFactory.cs index d6a1ac1d27..efe8933bfb 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/SimpleValueProviderFactory.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/SimpleValueProviderFactory.cs @@ -4,7 +4,6 @@ using System; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc.ModelBinding { diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelBinderFactory.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelBinderFactory.cs index 87ed105988..c54bf69118 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelBinderFactory.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelBinderFactory.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.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs index 684875d565..5a3b6c6cf8 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Reflection; using Microsoft.AspNetCore.Mvc.DataAnnotations; using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Localization; diff --git a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs index 4543e2e8cd..c6d7bb36ce 100644 --- a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs @@ -7,9 +7,9 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors.Infrastructure; +using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; diff --git a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs b/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs index b8ba11f04f..8d37b71672 100644 --- a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Primitives; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs index 4002e30c99..86d1d031b9 100644 --- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.AspNetCore.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DefaultOrderTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DefaultOrderTest.cs index 676ff499fa..9ad42e0ee4 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DefaultOrderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DefaultOrderTest.cs @@ -8,9 +8,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Xunit; namespace Microsoft.AspNetCore.Mvc.FunctionalTests @@ -26,19 +24,19 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public HttpClient Client { get; } [Theory] - [InlineData(typeof(IActionDescriptorProvider), typeof(ControllerActionDescriptorProvider), -1000)] + [InlineData(typeof(IActionDescriptorProvider), "Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider", -1000)] [InlineData(typeof(IActionInvokerProvider), null, -1000)] [InlineData(typeof(IApiDescriptionProvider), null, -1000)] [InlineData(typeof(IFilterProvider), null, -1000)] [InlineData(typeof(IActionConstraintProvider), null, -1000)] - public async Task ServiceOrder_GetOrder(Type serviceType, Type actualType, int order) + public async Task ServiceOrder_GetOrder(Type serviceType, string actualType, int order) { // Arrange var url = "http://localhost/Order/GetServiceOrder?serviceType=" + serviceType.AssemblyQualifiedName; if (actualType != null) { - url += "&actualType=" + actualType.AssemblyQualifiedName; + url += "&actualType=" + actualType; } // Act diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTests.cs index 538d06358c..b3523419c5 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTests.cs @@ -4,7 +4,6 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Newtonsoft.Json; using Xunit; @@ -106,7 +105,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests { typeof(RouteCollection).FullName, typeof(Route).FullName, - typeof(MvcRouteHandler).FullName, + "Microsoft.AspNetCore.Mvc.Routing.MvcRouteHandler", }, result.Routers); } @@ -126,8 +125,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests Assert.Equal(new string[] { typeof(RouteCollection).FullName, - typeof(AttributeRoute).FullName, - typeof(MvcAttributeRouteHandler).FullName, + "Microsoft.AspNetCore.Mvc.Routing.AttributeRoute", + "Microsoft.AspNetCore.Mvc.Routing.MvcAttributeRouteHandler", }, result.Routers); } diff --git a/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TryUpdateModelIntegrationTest.cs b/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TryUpdateModelIntegrationTest.cs index 0bf1131a36..d536e0190d 100644 --- a/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TryUpdateModelIntegrationTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TryUpdateModelIntegrationTest.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 System.Linq; using System.Collections.Generic; using System.IO; using System.Text; @@ -10,7 +9,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; -using Microsoft.AspNetCore.Mvc.ModelBinding.Internal; using Microsoft.Extensions.Primitives; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs index 858de6a312..64ab5cb124 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs @@ -3,7 +3,6 @@ using System.Linq; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers; diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs index bb0ae3360b..0e52ac624b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperActivatorTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/Infrastructure/DefaultTagHelperActivatorTest.cs similarity index 93% rename from test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperActivatorTest.cs rename to test/Microsoft.AspNetCore.Mvc.Razor.Test/Infrastructure/DefaultTagHelperActivatorTest.cs index 83a690499e..fd2a1a567b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperActivatorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/Infrastructure/DefaultTagHelperActivatorTest.cs @@ -2,12 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; -using System.Reflection; -using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewEngines; @@ -18,7 +15,7 @@ using Microsoft.Extensions.DependencyInjection; using Moq; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Razor.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.Infrastructure { public class DefaultTagHelperActivatorTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperFactoryTest.cs index 54c6bad46a..b09d936d01 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/DefaultTagHelperFactoryTest.cs @@ -6,7 +6,6 @@ using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewEngines; diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs index f4acfc4de6..ed0bc63ca6 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs @@ -12,8 +12,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.Razor.Infrastructure; using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; @@ -156,4 +157,4 @@ namespace Microsoft.AspNetCore.Mvc.Razor { } } -} \ No newline at end of file +} diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineOptionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineOptionsTest.cs index 30197bae76..6ca94c8069 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineOptionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineOptionsTest.cs @@ -2,9 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Linq; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.RazorPages.Test/Internal/PageActionInvokerTest.cs b/test/Microsoft.AspNetCore.Mvc.RazorPages.Test/Internal/PageActionInvokerTest.cs index 45078ef126..f20ebc5d57 100644 --- a/test/Microsoft.AspNetCore.Mvc.RazorPages.Test/Internal/PageActionInvokerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.RazorPages.Test/Internal/PageActionInvokerTest.cs @@ -1391,7 +1391,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal #endregion - protected override ResourceInvoker CreateInvoker( + protected override IActionInvoker CreateInvoker( IFilterMetadata[] filters, Exception exception = null, IActionResult result = null, diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs index ad85133eee..a047bca10e 100644 --- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs @@ -4,7 +4,7 @@ using System.Text.Encodings.Web; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Razor.Infrastructure; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/TestableHtmlGenerator.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/TestableHtmlGenerator.cs index daf8314ff5..174240d203 100644 --- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/TestableHtmlGenerator.cs +++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/TestableHtmlGenerator.cs @@ -8,8 +8,8 @@ using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewEngines; diff --git a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs index 4c1bfc7e78..f88c8dcb3b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs @@ -19,7 +19,6 @@ using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters.Json; using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Mvc.Razor.Internal; diff --git a/test/Microsoft.AspNetCore.Mvc.Test/Routing/ActionConstraintMatcherPolicyTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/Routing/ActionConstraintMatcherPolicyTest.cs index b21072b853..df7a7a5ab9 100644 --- a/test/Microsoft.AspNetCore.Mvc.Test/Routing/ActionConstraintMatcherPolicyTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Test/Routing/ActionConstraintMatcherPolicyTest.cs @@ -7,9 +7,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.Cors.Internal; +using Microsoft.AspNetCore.Mvc.Cors; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Matching; using Moq; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ControllerTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ControllerTest.cs index 07567c78b9..c7c347e867 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ControllerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ControllerTest.cs @@ -9,10 +9,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.DataAnnotations; -using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DependencyInjection/MvcViewFeaturesMvcBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DependencyInjection/MvcViewFeaturesMvcBuilderExtensionsTest.cs index 862d5e4ffc..fbbc3f16d9 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DependencyInjection/MvcViewFeaturesMvcBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DependencyInjection/MvcViewFeaturesMvcBuilderExtensionsTest.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ViewComponents; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/FormatWeekHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/FormatWeekHelperTest.cs index 97f45f0c0f..9e0428743d 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/FormatWeekHelperTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/FormatWeekHelperTest.cs @@ -3,7 +3,6 @@ using System; using System.Linq; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/TempDataApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/TempDataApplicationModelProviderTest.cs index ab6df27ee5..e63c92aac3 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/TempDataApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/TempDataApplicationModelProviderTest.cs @@ -5,7 +5,6 @@ using System; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Options; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/ViewDataAttributeApplicationModelProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/ViewDataAttributeApplicationModelProviderTest.cs index 0d8bf53d6d..048266c2f1 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/ViewDataAttributeApplicationModelProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Internal/ViewDataAttributeApplicationModelProviderTest.cs @@ -5,7 +5,6 @@ using System; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.ApplicationModels; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Options; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs index fcb0c7c92c..e2e633846a 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentResultTest.cs @@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ViewComponents; using Microsoft.AspNetCore.Mvc.ViewFeatures; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponents/DefaultViewComponentActivatorTests.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponents/DefaultViewComponentActivatorTests.cs index 24b940460a..134282bf86 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponents/DefaultViewComponentActivatorTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponents/DefaultViewComponentActivatorTests.cs @@ -5,7 +5,7 @@ using System; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Rendering; using Moq; using Xunit; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultHtmlGeneratorTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultHtmlGeneratorTest.cs index 0d38ca3674..b5c22bb727 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultHtmlGeneratorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultHtmlGeneratorTest.cs @@ -10,8 +10,8 @@ using System.Text.Encodings.Web; using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewEngines; diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultValidationHtmlAttributeProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultValidationHtmlAttributeProviderTest.cs index 3a77571657..7f36895f7e 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultValidationHtmlAttributeProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/DefaultValidationHtmlAttributeProviderTest.cs @@ -7,8 +7,8 @@ using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewEngines; using Microsoft.AspNetCore.Routing; diff --git a/test/Microsoft.AspNetCore.Mvc.Views.TestCommon/HtmlGeneratorUtilities.cs b/test/Microsoft.AspNetCore.Mvc.Views.TestCommon/HtmlGeneratorUtilities.cs index a40024c7e4..cd2869de40 100644 --- a/test/Microsoft.AspNetCore.Mvc.Views.TestCommon/HtmlGeneratorUtilities.cs +++ b/test/Microsoft.AspNetCore.Mvc.Views.TestCommon/HtmlGeneratorUtilities.cs @@ -2,8 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Antiforgery; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.Extensions.Options; using Microsoft.Extensions.WebEncoders.Testing; diff --git a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs index fea8184296..c246b0940d 100644 --- a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ApiControllerActionDiscoveryTest.cs @@ -11,8 +11,6 @@ using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.WebApiCompatShim; using Microsoft.Extensions.Options; diff --git a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs index eb625745db..15213d5ebf 100644 --- a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/BadRequestErrorMessageResultTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs index 60d40dd418..83163680f3 100644 --- a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/ExceptionResultTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs index 51fee66615..06908cb2a3 100644 --- a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/InvalidModelStateResultTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; diff --git a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs index 1e8011e116..0fdecd0eeb 100644 --- a/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.WebApiCompatShimTest/NegotiatedContentResultTest.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; diff --git a/test/WebSites/BasicWebSite/Controllers/OrderController.cs b/test/WebSites/BasicWebSite/Controllers/OrderController.cs index f781568b38..d196bbdd3e 100644 --- a/test/WebSites/BasicWebSite/Controllers/OrderController.cs +++ b/test/WebSites/BasicWebSite/Controllers/OrderController.cs @@ -19,7 +19,7 @@ namespace BasicWebSite var services = (IEnumerable)HttpContext?.RequestServices.GetService(queryType); foreach (var service in services) { - if (actualType != null && service.GetType().AssemblyQualifiedName == actualType) + if (actualType != null && service.GetType().FullName == actualType) { var orderProperty = elementType.GetTypeInfo().GetDeclaredProperty("Order"); return (int)orderProperty.GetValue(service);