diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs b/src/Microsoft.AspNetCore.Mvc.Cors/CorsApplicationModelProvider.cs
similarity index 97%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/CorsApplicationModelProvider.cs
index 8344a8ca19..5afd4e6385 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsApplicationModelProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/CorsApplicationModelProvider.cs
@@ -8,9 +8,9 @@ using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Routing;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
- public class CorsApplicationModelProvider : IApplicationModelProvider
+ internal class CorsApplicationModelProvider : IApplicationModelProvider
{
public int Order => -1000 + 10;
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilter.cs b/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilter.cs
index 0d853eae9d..d4b374849d 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilter.cs
@@ -5,7 +5,6 @@ using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc.Cors.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Primitives;
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs b/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilterFactory.cs
similarity index 92%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilterFactory.cs
index 9cb7146f5c..517a85aea1 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsAuthorizationFilterFactory.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/CorsAuthorizationFilterFactory.cs
@@ -5,12 +5,12 @@ using System;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
///
/// A filter factory which creates a new instance of .
///
- public class CorsAuthorizationFilterFactory : IFilterFactory, IOrderedFilter
+ internal class CorsAuthorizationFilterFactory : IFilterFactory, IOrderedFilter
{
private readonly string _policyName;
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs b/src/Microsoft.AspNetCore.Mvc.Cors/CorsHttpMethodActionConstraint.cs
similarity index 100%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsHttpMethodActionConstraint.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/CorsHttpMethodActionConstraint.cs
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsLoggerExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Cors/CorsLoggerExtensions.cs
similarity index 89%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsLoggerExtensions.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/CorsLoggerExtensions.cs
index c3fab172b9..8bc4af91f4 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/CorsLoggerExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/CorsLoggerExtensions.cs
@@ -4,9 +4,9 @@
using System;
using Microsoft.Extensions.Logging;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
- public static class CorsLoggerExtensions
+ internal static class CorsLoggerExtensions
{
private static readonly Action _notMostEffectiveFilter;
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs
index a4cf5c1800..460a0cb4f9 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs
@@ -5,7 +5,6 @@ using System;
using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Mvc.Cors;
-using Microsoft.AspNetCore.Mvc.Cors.Internal;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Microsoft.Extensions.DependencyInjection
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs b/src/Microsoft.AspNetCore.Mvc.Cors/DisableCorsAuthorizationFilter.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/DisableCorsAuthorizationFilter.cs
index 8ecd6cbfb6..183add11a9 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/DisableCorsAuthorizationFilter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/DisableCorsAuthorizationFilter.cs
@@ -8,12 +8,12 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Primitives;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
///
/// An which ensures that an action does not run for a pre-flight request.
///
- public class DisableCorsAuthorizationFilter : ICorsAuthorizationFilter
+ internal class DisableCorsAuthorizationFilter : ICorsAuthorizationFilter
{
///
// Since clients' preflight requests would not have data to authenticate requests, this
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs b/src/Microsoft.AspNetCore.Mvc.Cors/ICorsAuthorizationFilter.cs
similarity index 71%
rename from src/Microsoft.AspNetCore.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs
rename to src/Microsoft.AspNetCore.Mvc.Cors/ICorsAuthorizationFilter.cs
index 6989ffd421..483a70980d 100644
--- a/src/Microsoft.AspNetCore.Mvc.Cors/Internal/ICorsAuthorizationFilter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/ICorsAuthorizationFilter.cs
@@ -3,12 +3,12 @@
using Microsoft.AspNetCore.Mvc.Filters;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
///
/// A filter that can be used to enable/disable CORS support for a resource.
///
- public interface ICorsAuthorizationFilter : IAsyncAuthorizationFilter, IOrderedFilter
+ internal interface ICorsAuthorizationFilter : IAsyncAuthorizationFilter, IOrderedFilter
{
}
}
diff --git a/src/Microsoft.AspNetCore.Mvc.Cors/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.Mvc.Cors/breakingchanges.netcore.json
new file mode 100644
index 0000000000..6c3a2d285c
--- /dev/null
+++ b/src/Microsoft.AspNetCore.Mvc.Cors/breakingchanges.netcore.json
@@ -0,0 +1,6 @@
+[
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter : Microsoft.AspNetCore.Mvc.Cors.Internal.ICorsAuthorizationFilter",
+ "Kind": "Removal"
+ }
+]
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/CompareAttributeAdapter.cs
similarity index 97%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/CompareAttributeAdapter.cs
index f64272fa04..43e60f89e5 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/CompareAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/CompareAttributeAdapter.cs
@@ -8,9 +8,9 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class CompareAttributeAdapter : AttributeAdapterBase
+ internal class CompareAttributeAdapter : AttributeAdapterBase
{
private readonly string _otherProperty;
@@ -105,4 +105,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs
similarity index 96%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs
index 05d2aacac3..946db2b755 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsClientModelValidatorProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsClientModelValidatorProvider.cs
@@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// An implementation of which provides client validators
@@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
/// The logic to support
/// is implemented in .
///
- public class DataAnnotationsClientModelValidatorProvider : IClientModelValidatorProvider
+ internal class DataAnnotationsClientModelValidatorProvider : IClientModelValidatorProvider
{
private readonly IOptions _options;
private readonly IStringLocalizerFactory _stringLocalizerFactory;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsLocalizationServices.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsLocalizationServices.cs
index 3ef1fde707..75c6a013fc 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsLocalizationServices.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsLocalizationServices.cs
@@ -6,9 +6,9 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public static class DataAnnotationsLocalizationServices
+ internal static class DataAnnotationsLocalizationServices
{
public static void AddDataAnnotationsLocalizationServices(
IServiceCollection services,
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs
similarity index 99%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs
index d0a2875c5a..e94ee78153 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsMetadataProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsMetadataProvider.cs
@@ -12,13 +12,13 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// An implementation of and for
/// the System.ComponentModel.DataAnnotations attribute classes.
///
- public class DataAnnotationsMetadataProvider :
+ internal class DataAnnotationsMetadataProvider :
IBindingMetadataProvider,
IDisplayMetadataProvider,
IValidationMetadataProvider
@@ -388,4 +388,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
return string.Empty;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs
similarity index 98%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs
index 563fa078a7..b70a7c4825 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataAnnotationsModelValidator.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidator.cs
@@ -8,12 +8,12 @@ using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// Validates based on the given .
///
- public class DataAnnotationsModelValidator : IModelValidator
+ internal class DataAnnotationsModelValidator : IModelValidator
{
private static readonly object _emptyValidationContextInstance = new object();
private readonly IStringLocalizer _stringLocalizer;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs
index b6266958c3..a0cd1c4d68 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataAnnotationsModelValidatorProvider.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs
similarity index 92%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs
index b9bfa16165..0c6bf4e115 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DataTypeAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs
@@ -6,13 +6,13 @@ using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// A validation adapter that is used to map 's to a single client side validation
/// rule.
///
- public class DataTypeAttributeAdapter : AttributeAdapterBase
+ internal class DataTypeAttributeAdapter : AttributeAdapterBase
{
public DataTypeAttributeAdapter(DataTypeAttribute attribute, string ruleName, IStringLocalizer stringLocalizer)
: base(attribute, stringLocalizer)
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs
similarity index 91%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs
index 2fb0fe4769..54a533a417 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/DefaultClientModelValidatorProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs
@@ -4,7 +4,7 @@
using System;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// A default implementation of .
@@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
/// The provides validators from
/// instances in .
///
- public class DefaultClientModelValidatorProvider : IClientModelValidatorProvider
+ internal class DefaultClientModelValidatorProvider : IClientModelValidatorProvider
{
///
public void CreateValidators(ClientValidatorProviderContext context)
@@ -42,4 +42,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs
index e3eab734b7..eb07025356 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationConfigureCompatibilityOptions.cs
@@ -2,11 +2,13 @@
// 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;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations
+namespace Microsoft.Extensions.DependencyInjection
{
internal class MvcDataAnnotationsLocalizationConfigureCompatibilityOptions : ConfigureCompatibilityOptions
{
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationOptionsSetup.cs
similarity index 77%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationOptionsSetup.cs
index e91f13b255..5410042c30 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsLocalizationOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsLocalizationOptionsSetup.cs
@@ -2,14 +2,15 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.Extensions.DependencyInjection
{
///
/// Sets up default options for .
///
- public class MvcDataAnnotationsLocalizationOptionsSetup : IConfigureOptions
+ internal class MvcDataAnnotationsLocalizationOptionsSetup : IConfigureOptions
{
///
public void Configure(MvcDataAnnotationsLocalizationOptions options)
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs
index ddbd623b3e..8ed3212e8b 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs
@@ -3,7 +3,6 @@
using System;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
namespace Microsoft.Extensions.DependencyInjection
{
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs
index 160a73345e..76a9ae46bb 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs
@@ -4,7 +4,6 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs
similarity index 92%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs
index 1b94e5c157..f43d3cca66 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MvcDataAnnotationsMvcOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs
@@ -2,15 +2,17 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.Extensions.DependencyInjection
{
///
/// Sets up default options for .
///
- public class MvcDataAnnotationsMvcOptionsSetup : IConfigureOptions
+ internal class MvcDataAnnotationsMvcOptionsSetup : IConfigureOptions
{
private readonly IStringLocalizerFactory _stringLocalizerFactory;
private readonly IValidationAttributeAdapterProvider _validationAttributeAdapterProvider;
@@ -60,4 +62,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
_stringLocalizerFactory));
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/FileExtensionsAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/FileExtensionsAttributeAdapter.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/FileExtensionsAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/FileExtensionsAttributeAdapter.cs
index 827188f769..c7f62c67ad 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/FileExtensionsAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/FileExtensionsAttributeAdapter.cs
@@ -7,9 +7,9 @@ using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class FileExtensionsAttributeAdapter : AttributeAdapterBase
+ internal class FileExtensionsAttributeAdapter : AttributeAdapterBase
{
private readonly string _extensions;
private readonly string _formattedExtensions;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs
similarity index 91%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs
index 3a1a2cf9e9..e07e1165af 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MaxLengthAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MaxLengthAttributeAdapter.cs
@@ -7,9 +7,9 @@ using System.Globalization;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class MaxLengthAttributeAdapter : AttributeAdapterBase
+ internal class MaxLengthAttributeAdapter : AttributeAdapterBase
{
private readonly string _max;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs
similarity index 91%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs
index 8d713b823c..488e17d59b 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/MinLengthAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/MinLengthAttributeAdapter.cs
@@ -7,9 +7,9 @@ using System.Globalization;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class MinLengthAttributeAdapter : AttributeAdapterBase
+ internal class MinLengthAttributeAdapter : AttributeAdapterBase
{
private readonly string _min;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidator.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidator.cs
index edc0286909..f9fc45d470 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidator.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidator.cs
@@ -6,13 +6,13 @@ using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// An implementation of that provides the rule for validating
/// numeric types.
///
- public class NumericClientModelValidator : IClientModelValidator
+ internal class NumericClientModelValidator : IClientModelValidator
{
///
public void AddValidation(ClientModelValidationContext context)
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs
similarity index 91%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs
index a2e182d381..20c1cf086a 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/NumericClientModelValidatorProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/NumericClientModelValidatorProvider.cs
@@ -4,13 +4,13 @@
using System;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// An implementation of which provides client validators
/// for specific numeric types.
///
- public class NumericClientModelValidatorProvider : IClientModelValidatorProvider
+ internal class NumericClientModelValidatorProvider : IClientModelValidatorProvider
{
///
public void CreateValidators(ClientValidatorProviderContext context)
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Properties/AssemblyInfo.cs
index a0584f4754..06956dcef0 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Properties/AssemblyInfo.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Properties/AssemblyInfo.cs
@@ -3,10 +3,13 @@
using System.Runtime.CompilerServices;
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.DataAnnotations.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
\ No newline at end of file
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RangeAttributeAdapter.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/RangeAttributeAdapter.cs
index 345e6cc3b9..692dc900d0 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RangeAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RangeAttributeAdapter.cs
@@ -7,9 +7,9 @@ using System.Globalization;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class RangeAttributeAdapter : AttributeAdapterBase
+ internal class RangeAttributeAdapter : AttributeAdapterBase
{
private readonly string _max;
private readonly string _min;
@@ -56,4 +56,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
Attribute.Maximum);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs
index 552c5dcad2..d0278580cc 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RegularExpressionAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RegularExpressionAttributeAdapter.cs
@@ -6,9 +6,9 @@ using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class RegularExpressionAttributeAdapter : AttributeAdapterBase
+ internal class RegularExpressionAttributeAdapter : AttributeAdapterBase
{
public RegularExpressionAttributeAdapter(RegularExpressionAttribute attribute, IStringLocalizer stringLocalizer)
: base(attribute, stringLocalizer)
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RequiredAttributeAdapter.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/RequiredAttributeAdapter.cs
index 90e33ab49e..e4f824ae30 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/RequiredAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/RequiredAttributeAdapter.cs
@@ -6,9 +6,9 @@ using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class RequiredAttributeAdapter : AttributeAdapterBase
+ internal class RequiredAttributeAdapter : AttributeAdapterBase
{
public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer stringLocalizer)
: base(attribute, stringLocalizer)
@@ -37,4 +37,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
return GetErrorMessage(validationContext.ModelMetadata, validationContext.ModelMetadata.GetDisplayName());
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs
index f733d4470a..e1df7efab2 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/StringLengthAttributeAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/StringLengthAttributeAdapter.cs
@@ -7,9 +7,9 @@ using System.Globalization;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class StringLengthAttributeAdapter : AttributeAdapterBase
+ internal class StringLengthAttributeAdapter : AttributeAdapterBase
{
private readonly string _max;
private readonly string _min;
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidatableObjectAdapter.cs
similarity index 95%
rename from src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs
rename to src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidatableObjectAdapter.cs
index 55a9ca23a1..022e637fb8 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Internal/ValidatableObjectAdapter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidatableObjectAdapter.cs
@@ -7,9 +7,9 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
- public class ValidatableObjectAdapter : IModelValidator
+ internal class ValidatableObjectAdapter : IModelValidator
{
public IEnumerable Validate(ModelValidationContext context)
{
diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs
index a16b405a5f..7ec543d39d 100644
--- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/ValidationAttributeAdapterProvider.cs
@@ -3,7 +3,6 @@
using System;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.Extensions.Localization;
namespace Microsoft.AspNetCore.Mvc.DataAnnotations
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcCoreBuilderExtensions.cs
index accd9045eb..7314bb1df9 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcCoreBuilderExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcCoreBuilderExtensions.cs
@@ -4,8 +4,8 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
+using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Mvc.Formatters.Json;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonMvcOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcOptionsSetup.cs
similarity index 94%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonMvcOptionsSetup.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcOptionsSetup.cs
index 33f2b51eac..bc2f044e92 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonMvcOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonMvcOptionsSetup.cs
@@ -4,19 +4,20 @@
using System;
using System.Buffers;
using Microsoft.AspNetCore.JsonPatch;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ObjectPool;
using Microsoft.Extensions.Options;
-using Microsoft.Net.Http.Headers;
using Newtonsoft.Json.Linq;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.Extensions.DependencyInjection
{
///
/// Sets up JSON formatter options for .
///
- public class MvcJsonMvcOptionsSetup : IConfigureOptions
+ internal class MvcJsonMvcOptionsSetup : IConfigureOptions
{
private readonly ILoggerFactory _loggerFactory;
private readonly MvcJsonOptions _jsonOptions;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonOptionsConfigureCompatibilityOptions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonOptionsConfigureCompatibilityOptions.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonOptionsConfigureCompatibilityOptions.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonOptionsConfigureCompatibilityOptions.cs
index f33e6dc108..5fe4836b37 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonOptionsConfigureCompatibilityOptions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonOptionsConfigureCompatibilityOptions.cs
@@ -2,11 +2,12 @@
// 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;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc
+namespace Microsoft.Extensions.DependencyInjection
{
internal class MvcJsonOptionsConfigureCompatibilityOptions : ConfigureCompatibilityOptions
{
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonOptionsExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonOptionsExtensions.cs
similarity index 100%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonOptionsExtensions.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/DependencyInjection/MvcJsonOptionsExtensions.cs
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonArrayPool.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonArrayPool.cs
similarity index 88%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonArrayPool.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonArrayPool.cs
index 437f9bcf98..773dc82693 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonArrayPool.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonArrayPool.cs
@@ -5,9 +5,9 @@ using System;
using System.Buffers;
using Newtonsoft.Json;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
- public class JsonArrayPool : IArrayPool
+ internal class JsonArrayPool : IArrayPool
{
private readonly ArrayPool _inner;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonInputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonInputFormatter.cs
index cc21792d71..b217ce441e 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonInputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonInputFormatter.cs
@@ -10,7 +10,6 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonOutputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonOutputFormatter.cs
index 744d558680..7dafe6fe94 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonOutputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonOutputFormatter.cs
@@ -7,7 +7,6 @@ using System.ComponentModel;
using System.IO;
using System.Text;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
using Newtonsoft.Json;
namespace Microsoft.AspNetCore.Mvc.Formatters
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonPatchInputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonPatchInputFormatter.cs
index 96549d44d5..9fd0a364b3 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonPatchInputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonPatchInputFormatter.cs
@@ -7,7 +7,6 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.JsonPatch;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ObjectPool;
using Newtonsoft.Json;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResult.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResult.cs
index a4a576a83f..5abad92bff 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResult.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResult.cs
@@ -3,7 +3,7 @@
using System;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
+using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResultExecutor.cs
similarity index 81%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResultExecutor.cs
index 7a0eae64e2..81f0f783d7 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonResultExecutor.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonResultExecutor.cs
@@ -11,18 +11,21 @@ using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
using Newtonsoft.Json;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
///
/// Executes a to write to the response.
///
- public class JsonResultExecutor
+ internal class JsonResultExecutor
{
private static readonly string DefaultContentType = new MediaTypeHeaderValue("application/json")
{
Encoding = Encoding.UTF8
}.ToString();
+ private readonly IHttpResponseStreamWriterFactory _writerFactory;
+ private readonly ILogger _logger;
+ private readonly MvcJsonOptions _options;
private readonly IArrayPool _charPool;
///
@@ -58,34 +61,19 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
throw new ArgumentNullException(nameof(charPool));
}
- WriterFactory = writerFactory;
- Logger = logger;
- Options = options.Value;
+ _writerFactory = writerFactory;
+ _logger = logger;
+ _options = options.Value;
_charPool = new JsonArrayPool(charPool);
}
- ///
- /// Gets the .
- ///
- protected ILogger Logger { get; }
-
- ///
- /// Gets the .
- ///
- protected MvcJsonOptions Options { get; }
-
- ///
- /// Gets the .
- ///
- protected IHttpResponseStreamWriterFactory WriterFactory { get; }
-
///
/// Executes the and writes the response.
///
/// The .
/// The .
/// A which will complete when writing has completed.
- public virtual async Task ExecuteAsync(ActionContext context, JsonResult result)
+ public async Task ExecuteAsync(ActionContext context, JsonResult result)
{
if (context == null)
{
@@ -113,10 +101,10 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
response.StatusCode = result.StatusCode.Value;
}
- var serializerSettings = result.SerializerSettings ?? Options.SerializerSettings;
+ var serializerSettings = result.SerializerSettings ?? _options.SerializerSettings;
- Logger.JsonResultExecuting(result.Value);
- using (var writer = WriterFactory.CreateWriter(response.Body, resolvedContentTypeEncoding))
+ _logger.JsonResultExecuting(result.Value);
+ using (var writer = _writerFactory.CreateWriter(response.Body, resolvedContentTypeEncoding))
{
using (var jsonWriter = new JsonTextWriter(writer))
{
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonSerializerObjectPolicy.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonSerializerObjectPolicy.cs
similarity index 88%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonSerializerObjectPolicy.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonSerializerObjectPolicy.cs
index 5cd0a0e3d6..4efc81abcc 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/JsonSerializerObjectPolicy.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/JsonSerializerObjectPolicy.cs
@@ -4,12 +4,12 @@
using Microsoft.Extensions.ObjectPool;
using Newtonsoft.Json;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
///
/// for .
///
- public class JsonSerializerObjectPolicy : IPooledObjectPolicy
+ internal class JsonSerializerObjectPolicy : IPooledObjectPolicy
{
private readonly JsonSerializerSettings _serializerSettings;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MediaTypeHeaderValues.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MediaTypeHeaderValues.cs
similarity index 89%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MediaTypeHeaderValues.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/MediaTypeHeaderValues.cs
index d9fb986507..ec791b15ef 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MediaTypeHeaderValues.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MediaTypeHeaderValues.cs
@@ -3,9 +3,9 @@
using Microsoft.Net.Http.Headers;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
- internal class MediaTypeHeaderValues
+ internal static class MediaTypeHeaderValues
{
public static readonly MediaTypeHeaderValue ApplicationJson
= MediaTypeHeaderValue.Parse("application/json").CopyAsReadOnly();
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonLoggerExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonLoggerExtensions.cs
similarity index 95%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonLoggerExtensions.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonLoggerExtensions.cs
index c06d819865..c4f15f190a 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Internal/MvcJsonLoggerExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/MvcJsonLoggerExtensions.cs
@@ -4,7 +4,7 @@
using System;
using Microsoft.Extensions.Logging;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
internal static class MvcJsonLoggerExtensions
{
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Properties/AssemblyInfo.cs
index 7982959233..a6552b389c 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Properties/AssemblyInfo.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Properties/AssemblyInfo.cs
@@ -3,4 +3,6 @@
using System.Runtime.CompilerServices;
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Json.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MvcXmlOptionsConfigureCompatibilityOptions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/MvcXmlOptionsConfigureCompatibilityOptions.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MvcXmlOptionsConfigureCompatibilityOptions.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/MvcXmlOptionsConfigureCompatibilityOptions.cs
index c5d1d3e340..d37e67d3e1 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MvcXmlOptionsConfigureCompatibilityOptions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/MvcXmlOptionsConfigureCompatibilityOptions.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.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Formatters.Xml;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc
+namespace Microsoft.Extensions.DependencyInjection
{
internal sealed class MvcXmlOptionsConfigureCompatibilityOptions : ConfigureCompatibilityOptions
{
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerMvcOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlDataContractSerializerMvcOptionsSetup.cs
similarity index 94%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerMvcOptionsSetup.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlDataContractSerializerMvcOptionsSetup.cs
index eba6b9d5fd..83a8fd5b67 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerMvcOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlDataContractSerializerMvcOptionsSetup.cs
@@ -2,15 +2,15 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Xml;
-using System.Xml.Linq;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Formatters;
+using Microsoft.AspNetCore.Mvc.Formatters.Xml;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
+namespace Microsoft.Extensions.DependencyInjection
{
///
/// A implementation which will add the
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerMvcOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlSerializerMvcOptionsSetup.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerMvcOptionsSetup.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlSerializerMvcOptionsSetup.cs
index 1a57d167ce..3186fab390 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerMvcOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/DependencyInjection/XmlSerializerMvcOptionsSetup.cs
@@ -2,11 +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.Formatters.Xml.Internal;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Formatters;
+using Microsoft.AspNetCore.Mvc.Formatters.Xml;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
+namespace Microsoft.Extensions.DependencyInjection
{
///
/// A implementation which will add the
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/FormattingUtilities.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/FormattingUtilities.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/FormattingUtilities.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Xml/FormattingUtilities.cs
index 7b97d7ca79..70a9c94453 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/FormattingUtilities.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/FormattingUtilities.cs
@@ -4,12 +4,12 @@
using System.Runtime.Serialization;
using System.Xml;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
///
/// Contains methods which are used by Xml input formatters.
///
- public static class FormattingUtilities
+ internal static class FormattingUtilities
{
public static readonly int DefaultMaxDepth = 32;
public static readonly XsdDataContractExporter XsdDataContractExporter = new XsdDataContractExporter();
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/LoggerExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/LoggerExtensions.cs
index dfb00627d4..76496bea3a 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/LoggerExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/LoggerExtensions.cs
@@ -4,9 +4,9 @@
using System;
using Microsoft.Extensions.Logging;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
- public static class LoggerExtensions
+ internal static class LoggerExtensions
{
private static readonly Action _failedToCreateXmlSerializer;
private static readonly Action _failedToCreateDataContractSerializer;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/MediaTypeHeaderValues.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MediaTypeHeaderValues.cs
similarity index 92%
rename from src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/MediaTypeHeaderValues.cs
rename to src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MediaTypeHeaderValues.cs
index 14f2a99ce4..24ddce0b3f 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Internal/MediaTypeHeaderValues.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/MediaTypeHeaderValues.cs
@@ -3,7 +3,7 @@
using Microsoft.Net.Http.Headers;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
internal static class MediaTypeHeaderValues
{
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs
index b3c6e52b2b..ac1b2a085e 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerInputFormatter.cs
@@ -13,7 +13,6 @@ using System.Threading.Tasks;
using System.Xml;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Formatters.Xml;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.WebUtilities;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerOutputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerOutputFormatter.cs
index 9b89042636..c0a9cdab2d 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerOutputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlDataContractSerializerOutputFormatter.cs
@@ -10,7 +10,6 @@ using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.AspNetCore.Mvc.Formatters.Xml;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
using Microsoft.Extensions.Logging;
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 77f37c740c..729d9e1117 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerInputFormatter.cs
@@ -13,7 +13,6 @@ using System.Xml;
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.Infrastructure;
using Microsoft.AspNetCore.WebUtilities;
diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerOutputFormatter.cs b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerOutputFormatter.cs
index c289972ea4..9960eedbd6 100644
--- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerOutputFormatter.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/XmlSerializerOutputFormatter.cs
@@ -10,7 +10,6 @@ using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.AspNetCore.Mvc.Formatters.Xml;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc.Formatters
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/AttributeMatcher.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/AttributeMatcher.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/AttributeMatcher.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/AttributeMatcher.cs
index 5caa08dc5b..309f2aa574 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/AttributeMatcher.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/AttributeMatcher.cs
@@ -5,12 +5,12 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.TagHelpers;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
///
/// Methods for determining how an should run based on the attributes that were specified.
///
- public static class AttributeMatcher
+ internal static class AttributeMatcher
{
///
/// Determines the most effective mode a can run in based on which modes have
@@ -73,15 +73,13 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
// Perf: Avoid allocating enumerator
for (var i = 0; i < requiredAttributes.Length; i++)
{
- TagHelperAttribute attribute;
- if (!context.AllAttributes.TryGetAttribute(requiredAttributes[i], out attribute))
+ if (!context.AllAttributes.TryGetAttribute(requiredAttributes[i], out var attribute))
{
// Missing attribute.
return true;
}
- var valueAsString = attribute.Value as string;
- if (valueAsString != null && string.IsNullOrEmpty(valueAsString))
+ if (attribute.Value is string valueAsString && string.IsNullOrEmpty(valueAsString))
{
// Treat attributes with empty values as missing.
return true;
@@ -91,4 +89,4 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
return false;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Cache/DistributedCacheTagHelperService.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/Cache/DistributedCacheTagHelperService.cs
index 7db418f9b4..88c4e0332c 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Cache/DistributedCacheTagHelperService.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/Cache/DistributedCacheTagHelperService.cs
@@ -9,7 +9,6 @@ using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
@@ -80,10 +79,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Cache
while (content == null)
{
- Task result;
-
// Is there any request already processing the value?
- if (!_workers.TryGetValue(key, out result))
+ if (!_workers.TryGetValue(key, out var result))
{
// There is a small race condition here between TryGetValue and TryAdd that might cause the
// content to be computed more than once. We don't care about this race as the probability of
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs
index 72d106ce91..a097528945 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs
@@ -10,7 +10,6 @@ using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.TagHelpers.Cache;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Memory;
@@ -44,9 +43,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
/// used by the .
/// The to use.
public CacheTagHelper(
-#pragma warning disable PUB0001 // Pubternal type in public API
CacheTagHelperMemoryCacheFactory factory,
-#pragma warning restore PUB0001
HtmlEncoder htmlEncoder)
: base(htmlEncoder)
{
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CacheTagHelperMemoryCacheFactory.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelperMemoryCacheFactory.cs
similarity index 93%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CacheTagHelperMemoryCacheFactory.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelperMemoryCacheFactory.cs
index 7239f80260..6b1ac41fb8 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CacheTagHelperMemoryCacheFactory.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelperMemoryCacheFactory.cs
@@ -4,7 +4,7 @@
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
public class CacheTagHelperMemoryCacheFactory
{
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CurrentValues.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CurrentValues.cs
similarity index 85%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CurrentValues.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/CurrentValues.cs
index 6126d91507..8794df7203 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/CurrentValues.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/CurrentValues.cs
@@ -4,9 +4,9 @@
using System.Collections.Generic;
using System.Diagnostics;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
- public class CurrentValues
+ internal class CurrentValues
{
public CurrentValues(ICollection values)
{
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/DependencyInjection/TagHelperExtensions.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/DependencyInjection/TagHelperExtensions.cs
index 5161244492..e39242536a 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/DependencyInjection/TagHelperExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/DependencyInjection/TagHelperExtensions.cs
@@ -4,7 +4,6 @@
using System;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.TagHelpers.Cache;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Microsoft.Extensions.DependencyInjection
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingDirectory.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingDirectory.cs
similarity index 96%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingDirectory.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingDirectory.cs
index c2d0bf6227..5cb63e410f 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingDirectory.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingDirectory.cs
@@ -6,9 +6,9 @@ using System.Collections.Generic;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.FileSystemGlobbing.Abstractions;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
- public class FileProviderGlobbingDirectory : DirectoryInfoBase
+ internal class FileProviderGlobbingDirectory : DirectoryInfoBase
{
private const char DirectorySeparatorChar = '/';
private readonly IFileProvider _fileProvider;
@@ -96,4 +96,4 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
return new FileProviderGlobbingFile(fileInfo, this);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingFile.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingFile.cs
similarity index 90%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingFile.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingFile.cs
index 2696781c8c..67ccc9e046 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/FileProviderGlobbingFile.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/FileProviderGlobbingFile.cs
@@ -5,9 +5,9 @@ using System;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.FileSystemGlobbing.Abstractions;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
- public class FileProviderGlobbingFile : FileInfoBase
+ internal class FileProviderGlobbingFile : FileInfoBase
{
private const char DirectorySeparatorChar = '/';
@@ -34,4 +34,4 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
public override DirectoryInfoBase ParentDirectory { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/GlobbingUrlBuilder.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/GlobbingUrlBuilder.cs
similarity index 99%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/GlobbingUrlBuilder.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/GlobbingUrlBuilder.cs
index ce891ad84e..82c176bc8b 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/GlobbingUrlBuilder.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/GlobbingUrlBuilder.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.FileSystemGlobbing;
using Microsoft.Extensions.Internal;
using Microsoft.Extensions.Primitives;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
///
/// Utility methods for 's that support
@@ -381,4 +381,4 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/JavaScriptResources.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/JavaScriptResources.cs
similarity index 95%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/JavaScriptResources.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/JavaScriptResources.cs
index ad0bdf93a4..394d9de910 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/JavaScriptResources.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/JavaScriptResources.cs
@@ -7,12 +7,12 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
///
/// Methods for loading JavaScript from assembly embedded resources.
///
- public static class JavaScriptResources
+ internal static class JavaScriptResources
{
private static readonly Assembly ResourcesAssembly = typeof(JavaScriptResources).GetTypeInfo().Assembly;
@@ -58,4 +58,4 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
return input.Substring(0, input.Length - 2);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/LinkTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/LinkTagHelper.cs
index d082db1ef6..34d4ef1fa1 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/LinkTagHelper.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/LinkTagHelper.cs
@@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Memory;
@@ -241,9 +240,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
protected JavaScriptEncoder JavaScriptEncoder { get; }
// Internal for ease of use when testing.
-#pragma warning disable PUB0001 // Pubternal type in public API
protected internal GlobbingUrlBuilder GlobbingUrlBuilder { get; set; }
-#pragma warning restore PUB0001
internal IFileVersionProvider FileVersionProvider { get; private set; }
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/ModeAttributesOfT.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/ModeAttributesOfT.cs
similarity index 92%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/ModeAttributesOfT.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/ModeAttributesOfT.cs
index d5079b7d46..6aafc88d8f 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/ModeAttributesOfT.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/ModeAttributesOfT.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.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
///
/// A mapping of a mode to its required attributes.
///
/// The type representing the 's mode.
- public class ModeAttributes
+ internal class ModeAttributes
{
///
/// Initializes a new instance of .
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/MvcTagHelpersLoggerExtensions.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/MvcTagHelpersLoggerExtensions.cs
similarity index 94%
rename from src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/MvcTagHelpersLoggerExtensions.cs
rename to src/Microsoft.AspNetCore.Mvc.TagHelpers/MvcTagHelpersLoggerExtensions.cs
index 1943e1bcb8..7a78c67530 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Internal/MvcTagHelpersLoggerExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/MvcTagHelpersLoggerExtensions.cs
@@ -4,7 +4,7 @@
using System;
using Microsoft.Extensions.Logging;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
internal static class MvcTagHelperLoggerExtensions
{
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/OptionTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/OptionTagHelper.cs
index 8f2678e968..3cfaf3bb4c 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/OptionTagHelper.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/OptionTagHelper.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
@@ -76,8 +75,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
if (!output.Attributes.ContainsName("selected"))
{
// Is this element a child of a element the SelectTagHelper targeted?
- object formDataEntry;
- context.Items.TryGetValue(typeof(SelectTagHelper), out formDataEntry);
+ context.Items.TryGetValue(typeof(SelectTagHelper), out var formDataEntry);
// ... And did the SelectTagHelper determine any selected values?
var currentValues = formDataEntry as CurrentValues;
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/ScriptTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/ScriptTagHelper.cs
index c9b217c1da..5720d7cd62 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/ScriptTagHelper.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/ScriptTagHelper.cs
@@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Memory;
@@ -209,9 +208,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
protected JavaScriptEncoder JavaScriptEncoder { get; }
// Internal for ease of use when testing.
-#pragma warning disable PUB0001 // Pubternal type in public API
protected internal GlobbingUrlBuilder GlobbingUrlBuilder { get; set; }
-#pragma warning restore PUB0001
// Shared writer for determining the string content of a TagHelperAttribute's Value.
private StringWriter StringWriter
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs
index f0e5dd2d06..c3d946bc8d 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs
@@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/TagHelperOutputExtensions.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/TagHelperOutputExtensions.cs
index 91be1e59de..c79aa9fcfa 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/TagHelperOutputExtensions.cs
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/TagHelperOutputExtensions.cs
@@ -116,8 +116,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
}
else if (string.Equals(attribute.Key, "class", StringComparison.OrdinalIgnoreCase))
{
- TagHelperAttribute classAttribute;
- var found = tagHelperOutput.Attributes.TryGetAttribute("class", out classAttribute);
+ var found = tagHelperOutput.Attributes.TryGetAttribute("class", out var classAttribute);
Debug.Assert(found);
var newAttribute = new TagHelperAttribute(
@@ -394,8 +393,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
var wroteLeft = false;
if (_left != null)
{
- var htmlContent = _left as IHtmlContent;
- if (htmlContent != null)
+ if (_left is IHtmlContent htmlContent)
{
// Ignore case where htmlContent is HtmlString.Empty. At worst, will add a leading space to the
// generated attribute value.
diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.Mvc.TagHelpers/breakingchanges.netcore.json
index 2f91e8be92..ece8a05977 100644
--- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/breakingchanges.netcore.json
+++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/breakingchanges.netcore.json
@@ -3,5 +3,30 @@
"TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper",
"MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.IViewBufferScope viewBufferScope)",
"Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper",
+ "MemberId": "protected Microsoft.AspNetCore.Mvc.TagHelpers.Internal.GlobbingUrlBuilder get_GlobbingUrlBuilder()",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper",
+ "MemberId": "protected System.Void set_GlobbingUrlBuilder(Microsoft.AspNetCore.Mvc.TagHelpers.Internal.GlobbingUrlBuilder value)",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper",
+ "MemberId": "protected Microsoft.AspNetCore.Mvc.TagHelpers.Internal.GlobbingUrlBuilder get_GlobbingUrlBuilder()",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper",
+ "MemberId": "protected System.Void set_GlobbingUrlBuilder(Microsoft.AspNetCore.Mvc.TagHelpers.Internal.GlobbingUrlBuilder value)",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelper : Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase",
+ "MemberId": "public .ctor(Microsoft.AspNetCore.Mvc.TagHelpers.Internal.CacheTagHelperMemoryCacheFactory factory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder)",
+ "Kind": "Removal"
}
]
\ No newline at end of file
diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewOptionsSetup.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewOptionsSetup.cs
index 9b454f2c86..29548e907d 100644
--- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewOptionsSetup.cs
+++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/DependencyInjection/MvcViewOptionsSetup.cs
@@ -4,7 +4,6 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ModelExpressionProvider.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ModelExpressionProvider.cs
index 3a9d98eca6..9d4c73b745 100644
--- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ModelExpressionProvider.cs
+++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ModelExpressionProvider.cs
@@ -22,10 +22,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
/// The .
public ModelExpressionProvider(
IModelMetadataProvider modelMetadataProvider,
-#pragma warning disable PUB0001 // Pubternal type in public API
- ExpressionTextCache expressionTextCache
-#pragma warning restore PUB0001
- )
+ ExpressionTextCache expressionTextCache)
{
if (modelMetadataProvider == null)
{
diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs
index c30ec32cdc..1254a79ed6 100644
--- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs
+++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/RemoteAttribute.cs
@@ -9,11 +9,11 @@ using System.Linq;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
+using Resources = Microsoft.AspNetCore.Mvc.ViewFeatures.Resources;
namespace Microsoft.AspNetCore.Mvc
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs
index ae1e56705e..0307a9c306 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/ParameterBinderTest.cs
@@ -12,7 +12,6 @@ using Microsoft.AspNetCore.JsonPatch;
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.ModelBinding.Metadata;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.AspNetCore.Testing;
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs
index 8cd31aec36..bb9c6f5c0c 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ClientValidatorCacheTest.cs
@@ -4,7 +4,6 @@
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs
index bc8e9d4aa4..f23d6f4bea 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs
@@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs
index f92c79f84d..cabd56b0d0 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ModelBinding/Validation/ValidatorCacheTest.cs
@@ -4,7 +4,6 @@
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestClientModelValidatorProvider.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestClientModelValidatorProvider.cs
index b466463027..366a791f1c 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestClientModelValidatorProvider.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestClientModelValidatorProvider.cs
@@ -3,7 +3,6 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.Extensions.Options;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
diff --git a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs
index 5a3b6c6cf8..d72bc80148 100644
--- a/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Core.TestCommon/TestModelMetadataProvider.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.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/CorsApplicationModelProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs
index c6d7bb36ce..6018faa7da 100644
--- a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsApplicationModelProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Cors.Test/CorsApplicationModelProviderTest.cs
@@ -17,7 +17,7 @@ using Microsoft.Extensions.Options;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
public class CorsApplicationModelProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs b/test/Microsoft.AspNetCore.Mvc.Cors.Test/CorsHttpMethodActionConstraintTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Cors.Test/CorsHttpMethodActionConstraintTest.cs
index 8d37b71672..83a0407e91 100644
--- a/test/Microsoft.AspNetCore.Mvc.Cors.Test/Internal/CorsHttpMethodActionConstraintTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Cors.Test/CorsHttpMethodActionConstraintTest.cs
@@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Primitives;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Cors.Internal
+namespace Microsoft.AspNetCore.Mvc.Cors
{
public class CorsHttpMethodActionConstraintTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Cors.Test/DisableCorsAuthorizationFilterTest.cs b/test/Microsoft.AspNetCore.Mvc.Cors.Test/DisableCorsAuthorizationFilterTest.cs
index 5584abad3b..3e4045a8df 100644
--- a/test/Microsoft.AspNetCore.Mvc.Cors.Test/DisableCorsAuthorizationFilterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Cors.Test/DisableCorsAuthorizationFilterTest.cs
@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
-using Microsoft.AspNetCore.Mvc.Cors.Internal;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Routing;
using Xunit;
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs
index ab3c4d0b5d..5750769245 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/CompareAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/CompareAttributeAdapterTest.cs
@@ -11,7 +11,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class CompareAttributeAdapterTest
{
@@ -254,4 +254,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
public string OtherProperty { get; set; }
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs
index a5b00aba19..b59bc73e32 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsClientModelValidatorProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsClientModelValidatorProviderTest.cs
@@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Options;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class DataAnnotationsClientModelValidatorProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs
index 0f18010965..1938bae7d0 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsMetadataProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsMetadataProviderTest.cs
@@ -15,7 +15,7 @@ using Microsoft.Extensions.Options;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public enum TestEnum
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs
index 4889e7c4da..a444011ccf 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorProviderTest.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Options;
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs
index b67c769f57..db454e90e8 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataAnnotationsModelValidatorTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataAnnotationsModelValidatorTest.cs
@@ -12,7 +12,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class DataAnnotationsModelValidatorTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs
index 499808aa94..728e559131 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataMemberRequiredBindingMetadataProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataMemberRequiredBindingMetadataProviderTest.cs
@@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class DataMemberRequiredBindingMetadataProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs
index 6d606bb739..2eb4483b9e 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DataTypeClientModelValidatorProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DataTypeClientModelValidatorProviderTest.cs
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class DataTypeClientModelValidatorProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs
index 5ca1d5b1f5..a6550a6719 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/DefaultModelClientValidatorProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/DefaultModelClientValidatorProviderTest.cs
@@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
// Integration tests for the default configuration of ModelMetadata and Validation providers
public class DefaultModelClientValidatorProviderTest
@@ -273,4 +273,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
public string Name { get; set; }
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/FileExtensionsAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/FileExtensionsAttributeAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/FileExtensionsAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/FileExtensionsAttributeAdapterTest.cs
index 0bf66c965c..a30cd6cf10 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/FileExtensionsAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/FileExtensionsAttributeAdapterTest.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Localization;
using Moq;
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs
index b20d0a4518..03498dee57 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MaxLengthAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MaxLengthAttributeAdapterTest.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class MaxLengthAttributeAdapterTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj
index 14f4f05b2f..e39fdd6f69 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj
@@ -9,5 +9,4 @@
-
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs
index a559e00e3c..3aaba29f55 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MinLengthAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MinLengthAttributeAdapterTest.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class MinLengthAttributeAdapterTest
{
@@ -133,4 +133,4 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
kvp => { Assert.Equal("data-val-minlength-min", kvp.Key); Assert.Equal("original", kvp.Value); });
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs
index 86d1d031b9..f4c1edbd99 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelMetadataProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelMetadataProviderTest.cs
@@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Options;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
// Integration tests for the default provider configuration.
public class ModelMetadataProviderTest
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelValidationResultComparer.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelValidationResultComparer.cs
similarity index 95%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelValidationResultComparer.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelValidationResultComparer.cs
index aafd2d3e60..12e5f1459a 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ModelValidationResultComparer.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ModelValidationResultComparer.cs
@@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class ModelValidationResultComparer : IEqualityComparer
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MvcDataAnnotationsMvcOptionsSetup.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MvcDataAnnotationsMvcOptionsSetup.cs
similarity index 91%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MvcDataAnnotationsMvcOptionsSetup.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MvcDataAnnotationsMvcOptionsSetup.cs
index 78887bb309..312f7d9aeb 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/MvcDataAnnotationsMvcOptionsSetup.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/MvcDataAnnotationsMvcOptionsSetup.cs
@@ -3,13 +3,13 @@
using System.Reflection;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Test.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Test
{
public class MvcDataAnnotationsMvcOptionsSetupTests
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs
index 581ccbf672..c9c9f32795 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/NumericClientModelValidatorTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/NumericClientModelValidatorTest.cs
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.AspNetCore.Testing;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class NumericClientModelValidatorTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs
index 626e915d0c..eb307bce1a 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RangeAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RangeAttributeAdapterTest.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Localization;
using Moq;
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs
index 3ea14c9586..dca1b4ca65 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/RequiredAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/RequiredAttributeAdapterTest.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class RequiredAttributeAdapterTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs
index fdf8bf9186..7a0a59c8f2 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/StringLengthAttributeAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/StringLengthAttributeAdapterTest.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class StringLengthAttributeAdapterTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/TestModelNameProvider.cs
similarity index 84%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/TestModelNameProvider.cs
index 3e93fbb7b4..7dc128d016 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestModelNameProvider.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/TestModelNameProvider.cs
@@ -3,10 +3,10 @@
using Microsoft.AspNetCore.Mvc.ModelBinding;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class TestModelNameProvider : IModelNameProvider
{
public string Name { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/TestResources.cs
similarity index 100%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/TestResources.cs
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidatableObjectAdapterTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidatableObjectAdapterTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidatableObjectAdapterTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidatableObjectAdapterTest.cs
index 56a127ea25..45d5336592 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidatableObjectAdapterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidatableObjectAdapterTest.cs
@@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class ValidatableObjectAdapterTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs
similarity index 97%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs
index 3febb5f4e5..37382f1dce 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterOfTAttributeTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterOfTAttributeTest.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.Localization;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class ValidationAttributeAdapterOfTAttributeTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs
index beb2ffda18..ef6027c5a1 100644
--- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/ValidationAttributeAdapterProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/ValidationAttributeAdapterProviderTest.cs
@@ -5,7 +5,7 @@ using System;
using System.ComponentModel.DataAnnotations;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
+namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
public class ValidationAttributeAdapterProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/Internal/JsonResultExecutorTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultExecutorTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/Internal/JsonResultExecutorTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultExecutorTest.cs
index 8803474ccd..1db9b26cb6 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/Internal/JsonResultExecutorTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultExecutorTest.cs
@@ -19,7 +19,7 @@ using Moq;
using Newtonsoft.Json;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters
{
public class JsonResultExecutorTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultTest.cs
index bdc25acf77..866010f51e 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonResultTest.cs
@@ -7,7 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
+using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumerableTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumerableTest.cs
similarity index 97%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumerableTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumerableTest.cs
index b6945735eb..1fd2097e96 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumerableTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumerableTest.cs
@@ -4,7 +4,7 @@
using System.Linq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class DelegatingEnumerableTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumeratorTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumeratorTest.cs
similarity index 97%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumeratorTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumeratorTest.cs
index 4fc0e455f0..cf973a51cb 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/DelegatingEnumeratorTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DelegatingEnumeratorTest.cs
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class DelegatingEnumeratorTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerMvcOptionsSetupTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlDataContractSerializerMvcOptionsSetupTest.cs
similarity index 80%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerMvcOptionsSetupTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlDataContractSerializerMvcOptionsSetupTest.cs
index 08c2b0aaf2..48dfa1aab7 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerMvcOptionsSetupTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlDataContractSerializerMvcOptionsSetupTest.cs
@@ -1,11 +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;
+using Microsoft.AspNetCore.Mvc.Formatters;
+using Microsoft.AspNetCore.Mvc.Formatters.Xml;
using Microsoft.Extensions.Logging.Abstractions;
-using Microsoft.Extensions.Options;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
+namespace Microsoft.Extensions.DependencyInjection
{
public class XmlDataContractSerializerMvcOptionsSetupTest
{
@@ -13,7 +15,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsFormatterMapping()
{
// Arrange
- var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
@@ -28,7 +30,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void DoesNotOverrideExistingMapping()
{
// Arrange
- var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
options.FormatterMappings.SetMediaTypeMappingForFormat("xml", "text/xml");
@@ -44,7 +46,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsInputFormatter()
{
// Arrange
- var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
@@ -58,7 +60,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsOutputFormatter()
{
// Arrange
- var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlDataContractSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerMvcOptionsSetupTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlSerializerMvcOptionsSetupTest.cs
similarity index 80%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerMvcOptionsSetupTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlSerializerMvcOptionsSetupTest.cs
index d3b8790e64..b357f78806 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerMvcOptionsSetupTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/DependencyInjection/XmlSerializerMvcOptionsSetupTest.cs
@@ -1,11 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Formatters;
+using Microsoft.AspNetCore.Mvc.Formatters.Xml;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
-using Microsoft.Extensions.Options;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
+namespace Microsoft.Extensions.DependencyInjection
{
public class XmlSerializerMvcOptionsSetupTest
{
@@ -13,7 +16,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsFormatterMapping()
{
// Arrange
- var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
@@ -28,7 +31,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void DoesNotOverrideExistingMapping()
{
// Arrange
- var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
options.FormatterMappings.SetMediaTypeMappingForFormat("xml", "text/xml");
@@ -44,7 +47,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsInputFormatter()
{
// Arrange
- var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
@@ -58,7 +61,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
public void AddsOutputFormatter()
{
// Arrange
- var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
+ var optionsSetup = new XmlSerializerMvcOptionsSetup(Options.Options.Create(new MvcXmlOptions()), NullLoggerFactory.Instance);
var options = new MvcOptions();
// Act
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderFactoryTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderFactoryTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderFactoryTest.cs
index ccfcc526ae..fe31162d99 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderFactoryTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderFactoryTest.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Collections.Generic;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class EnumerableWrapperProviderFactoryTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderTest.cs
index b89802115d..95c7c7ebe1 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/EnumerableWrapperProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/EnumerableWrapperProviderTest.cs
@@ -7,7 +7,7 @@ using System.Linq;
using Microsoft.AspNetCore.Testing;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class EnumerableWrapperProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapper.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapper.cs
similarity index 93%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapper.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapper.cs
index 00488f741b..adfa86fafc 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapper.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapper.cs
@@ -3,7 +3,7 @@
using System;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class PersonWrapper : IUnwrappable
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProvider.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProvider.cs
similarity index 91%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProvider.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProvider.cs
index 572fc28ce7..ca82fc0d7b 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProvider.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProvider.cs
@@ -3,7 +3,7 @@
using System;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class PersonWrapperProvider : IWrapperProvider
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProviderFactory.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProviderFactory.cs
similarity index 89%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProviderFactory.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProviderFactory.cs
index 4870541b48..2e764089fd 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/PersonWrapperProviderFactory.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/PersonWrapperProviderFactory.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class PersonWrapperProviderFactory : IWrapperProviderFactory
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperProviderTest.cs
similarity index 96%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperProviderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperProviderTest.cs
index fbf779a0aa..c256851372 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperProviderTest.cs
@@ -4,7 +4,7 @@
using Microsoft.AspNetCore.Testing;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class SerializableErrorWrapperProviderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperTests.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperTests.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperTests.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperTests.cs
index ec0175b8df..cb96f35f93 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableErrorWrapperTests.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableErrorWrapperTests.cs
@@ -8,7 +8,7 @@ using System.Xml;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class SerializableErrorWrapperTests
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableWrapperProviderFactoryTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableWrapperProviderFactoryTest.cs
similarity index 96%
rename from test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableWrapperProviderFactoryTest.cs
rename to test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableWrapperProviderFactoryTest.cs
index e09a15b43c..153ef3750d 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/Internal/SerializableWrapperProviderFactoryTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/SerializableWrapperProviderFactoryTest.cs
@@ -3,7 +3,7 @@
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal
+namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
{
public class SerializableWrapperProviderFactoryTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerOutputFormatterTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerOutputFormatterTest.cs
index d7ee5be5cf..fd33afc148 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerOutputFormatterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlDataContractSerializerOutputFormatterTest.cs
@@ -9,13 +9,11 @@ using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
-using Moq;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
diff --git a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerOutputFormatterTest.cs b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerOutputFormatterTest.cs
index dd2602e548..34bb5e0298 100644
--- a/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerOutputFormatterTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test/XmlSerializerOutputFormatterTest.cs
@@ -10,13 +10,10 @@ using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Http.Features;
-using Microsoft.AspNetCore.Mvc.Formatters.Xml.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
-using Moq;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
diff --git a/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TestMvcOptions.cs b/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TestMvcOptions.cs
index cb7d13c97d..9711274063 100644
--- a/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TestMvcOptions.cs
+++ b/test/Microsoft.AspNetCore.Mvc.IntegrationTests/TestMvcOptions.cs
@@ -4,8 +4,7 @@
using System;
using System.Buffers;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
-using Microsoft.AspNetCore.Mvc.Formatters.Json.Internal;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ObjectPool;
diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcBuilderExtensionsTest.cs
index 64ab5cb124..a136b7fbdd 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.Razor.Internal;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.DependencyInjection;
diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs
index 0e52ac624b..bf5e47176c 100644
--- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/DependencyInjection/MvcRazorMvcCoreBuilderExtensionsTest.cs
@@ -6,7 +6,6 @@ using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
-using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.DependencyInjection;
diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
index cc8ea7833e..43d5e7e550 100644
--- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
@@ -15,7 +15,6 @@ using Microsoft.AspNetCore.Mvc.Formatters;
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;
using Microsoft.AspNetCore.Mvc.ViewEngines;
diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineTest.cs
index 99240071cf..ea2b61d873 100644
--- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewEngineTest.cs
@@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
-using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Razor.Language;
diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/TagHelpers/TagHelperComponentTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/TagHelpers/TagHelperComponentTagHelperTest.cs
index 660c548cf1..afa7321e7a 100644
--- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/TagHelpers/TagHelperComponentTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/TagHelpers/TagHelperComponentTagHelperTest.cs
@@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.DependencyInjection;
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/AttributeMatcherTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/AttributeMatcherTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/AttributeMatcherTest.cs
rename to test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/AttributeMatcherTest.cs
index 2fc93f6c91..e9ebf0decf 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/AttributeMatcherTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/AttributeMatcherTest.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
public class AttributeMatcherTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagHelperTest.cs
index 589ce007f8..9d43784485 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagHelperTest.cs
@@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.TagHelpers.Cache;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagKeyTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagKeyTest.cs
index 9f7190a6e0..859a4f34ab 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagKeyTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/CacheTagKeyTest.cs
@@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.TagHelpers.Cache;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/DefaultTagHelperActivatorTest.cs
similarity index 100%
rename from test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/DefaultTagHelperActivatorTest.cs
rename to test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/DefaultTagHelperActivatorTest.cs
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/GlobbingUrlBuilderTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/GlobbingUrlBuilderTest.cs
similarity index 99%
rename from test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/GlobbingUrlBuilderTest.cs
rename to test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/GlobbingUrlBuilderTest.cs
index 4bce947f96..224e82b83e 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/GlobbingUrlBuilderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/GlobbingUrlBuilderTest.cs
@@ -13,7 +13,7 @@ using Microsoft.Extensions.Primitives;
using Moq;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
public class GlobbingUrlBuilderTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/JavaScriptResourcesTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/JavaScriptResourcesTest.cs
similarity index 98%
rename from test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/JavaScriptResourcesTest.cs
rename to test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/JavaScriptResourcesTest.cs
index 477182cda7..1bf1456718 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/Internal/JavaScriptResourcesTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/JavaScriptResourcesTest.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.Text;
using Xunit;
-namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
+namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
public class JavaScriptResourcesTest
{
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/LinkTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/LinkTagHelperTest.cs
index 09ebce26e6..a34affa443 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/LinkTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/LinkTagHelperTest.cs
@@ -16,7 +16,6 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/OptionTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
index 9aa2ad26dc..866429bacd 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Xunit;
@@ -15,11 +14,11 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
// Original content, selected attribute, value attribute, selected values (to place in TagHelperContext.Items)
// and expected tag helper output.
- public static TheoryData GeneratesExpectedDataSet
+ public static TheoryData, TagHelperOutput> GeneratesExpectedDataSet
{
get
{
- return new TheoryData
+ return new TheoryData, TagHelperOutput>
{
// original content, selected, value, selected values,
// expected tag helper output - attributes, content
@@ -54,7 +53,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- null, null, "value", new CurrentValues(new HashSet()),
+ null, null, "value", new HashSet(),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -64,7 +63,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- null, null, "value", new CurrentValues(new HashSet(new [] { string.Empty, })),
+ null, null, "value", new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -74,7 +73,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- null, string.Empty, "value", new CurrentValues(new HashSet(new [] { string.Empty, })),
+ null, string.Empty, "value", new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -84,7 +83,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- null, null, "value", new CurrentValues(new HashSet(new [] { "value", })),
+ null, null, "value", new HashSet(new [] { "value", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -94,7 +93,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- null, null, "value", new CurrentValues(new HashSet(new [] { string.Empty, "value", })),
+ null, null, "value", new HashSet(new [] { string.Empty, "value", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -134,7 +133,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- string.Empty, null, null, new CurrentValues(new HashSet()),
+ string.Empty, null, null, new HashSet(),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -144,7 +143,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- string.Empty, null, null, new CurrentValues(new HashSet(new [] { string.Empty, })),
+ string.Empty, null, null, new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -155,7 +154,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
},
{
string.Empty, string.Empty, null,
- new CurrentValues(new HashSet(new [] { string.Empty, })),
+ new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -165,7 +164,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"")
},
{
- string.Empty, null, null, new CurrentValues(new HashSet(new [] { "text", })),
+ string.Empty, null, null, new HashSet(new [] { "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -176,7 +175,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
},
{
string.Empty, null, null,
- new CurrentValues(new HashSet(new [] { string.Empty, "text", })),
+ new HashSet(new [] { string.Empty, "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -216,7 +215,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, null, new CurrentValues(new HashSet()),
+ "text", null, null, new HashSet(),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -226,7 +225,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, null, new CurrentValues(new HashSet(new [] { string.Empty, })),
+ "text", null, null, new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -236,7 +235,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "HtmlEncode[[text]]", null, null, new CurrentValues(new HashSet(new [] { "text", })),
+ "HtmlEncode[[text]]", null, null, new HashSet(new [] { "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -246,7 +245,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"HtmlEncode[[text]]")
},
{
- "text", string.Empty, null, new CurrentValues(new HashSet(new [] { "text", })),
+ "text", string.Empty, null, new HashSet(new [] { "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -257,7 +256,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
},
{
"HtmlEncode[[text]]", null, null,
- new CurrentValues(new HashSet(new [] { string.Empty, "text", })),
+ new HashSet(new [] { string.Empty, "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -287,7 +286,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, "value", new CurrentValues(new HashSet()),
+ "text", null, "value", new HashSet(),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -297,7 +296,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, "value", new CurrentValues(new HashSet(new [] { string.Empty, })),
+ "text", null, "value", new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -308,7 +307,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
},
{
"text", string.Empty, "value",
- new CurrentValues(new HashSet(new [] { string.Empty, })),
+ new HashSet(new [] { string.Empty, }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -318,7 +317,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, "value", new CurrentValues(new HashSet(new [] { "text", })),
+ "text", null, "value", new HashSet(new [] { "text", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -328,7 +327,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
"text")
},
{
- "text", null, "value", new CurrentValues(new HashSet(new [] { "value", })),
+ "text", null, "value", new HashSet(new [] { "value", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -339,7 +338,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
},
{
"text", null, "value",
- new CurrentValues(new HashSet(new [] { string.Empty, "value", })),
+ new HashSet(new [] { string.Empty, "value", }),
GetTagHelperOutput(
"not-option",
new TagHelperAttributeList
@@ -360,7 +359,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
get
{
return GeneratesExpectedDataSet.Where(
- entry => (entry[1] != null || entry[3] == null || ((CurrentValues)(entry[3])).Values.Count == 0));
+ entry => (entry[1] != null || entry[3] == null || ((ICollection)(entry[3])).Count == 0));
}
}
@@ -381,7 +380,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
string originalContent,
string selected,
string value,
- CurrentValues currentValues,
+ ICollection currentValues,
TagHelperOutput expectedTagHelperOutput)
{
// Arrange
@@ -427,7 +426,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
model: null,
htmlGenerator: htmlGenerator,
metadataProvider: metadataProvider);
- tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues;
+ tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues == null ? null : new CurrentValues(currentValues);
var tagHelper = new OptionTagHelper(htmlGenerator)
{
Value = value,
@@ -453,8 +452,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
string originalContent,
string selected,
string value,
- CurrentValues currentValues,
- TagHelperOutput ignored)
+ ICollection currentValues,
+ TagHelperOutput _)
{
// Arrange
var originalAttributes = new TagHelperAttributeList
@@ -499,7 +498,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
model: null,
htmlGenerator: htmlGenerator,
metadataProvider: metadataProvider);
- tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues;
+ tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues == null ? null : new CurrentValues(currentValues);
var tagHelper = new OptionTagHelper(htmlGenerator)
{
Value = value,
@@ -517,8 +516,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
string originalContent,
string selected,
string value,
- CurrentValues ignoredValues,
- TagHelperOutput ignoredOutput)
+ ICollection _,
+ TagHelperOutput __)
{
// Arrange
var originalAttributes = new TagHelperAttributeList
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs
index 75f7da33a7..bad0762fcd 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs
@@ -15,7 +15,6 @@ using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/SelectTagHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/SelectTagHelperTest.cs
index 8b8f842669..8584c3b9dc 100644
--- a/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/SelectTagHelperTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test/SelectTagHelperTest.cs
@@ -9,7 +9,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Testing;
diff --git a/test/Microsoft.AspNetCore.Mvc.Test/MvcOptionsSetupTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/MvcOptionsSetupTest.cs
index f80437c550..1607c35ad1 100644
--- a/test/Microsoft.AspNetCore.Mvc.Test/MvcOptionsSetupTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Test/MvcOptionsSetupTest.cs
@@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.JsonPatch;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
diff --git a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs
index 697e78ddf1..9aecad709c 100644
--- a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs
@@ -13,11 +13,9 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Controllers;
-using Microsoft.AspNetCore.Mvc.Cors.Internal;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.Cors;
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.Razor;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
@@ -395,7 +393,7 @@ namespace Microsoft.AspNetCore.Mvc
typeof(IPostConfigureOptions),
new[]
{
- typeof(MvcJsonOptions).Assembly.GetType("Microsoft.AspNetCore.Mvc.MvcJsonOptionsConfigureCompatibilityOptions", throwOnError: true),
+ typeof(MvcJsonOptionsConfigureCompatibilityOptions),
}
},
{
diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DefaultValidationHtmlAttributeProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DefaultValidationHtmlAttributeProviderTest.cs
index 7f36895f7e..aa40da21ee 100644
--- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DefaultValidationHtmlAttributeProviderTest.cs
+++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/DefaultValidationHtmlAttributeProviderTest.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
+using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs
index 79ed10e0b4..0cd1f3fe4c 100644
--- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs
+++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/DefaultTemplatesUtilities.cs
@@ -12,7 +12,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
-using Microsoft.AspNetCore.Mvc.DataAnnotations.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewEngines;
diff --git a/test/WebSites/HtmlGenerationWebSite/TestCacheTagHelper.cs b/test/WebSites/HtmlGenerationWebSite/TestCacheTagHelper.cs
index e8f710d17e..2a99a3a3c6 100644
--- a/test/WebSites/HtmlGenerationWebSite/TestCacheTagHelper.cs
+++ b/test/WebSites/HtmlGenerationWebSite/TestCacheTagHelper.cs
@@ -6,7 +6,6 @@ using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.TagHelpers.Cache;
-using Microsoft.AspNetCore.Mvc.TagHelpers.Internal;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Logging;