diff --git a/src/Middleware/CORS/src/Internal/CORSLoggerExtensions.cs b/src/Middleware/CORS/src/CORSLoggerExtensions.cs similarity index 99% rename from src/Middleware/CORS/src/Internal/CORSLoggerExtensions.cs rename to src/Middleware/CORS/src/CORSLoggerExtensions.cs index 58886c37c9..4a4313e92d 100644 --- a/src/Middleware/CORS/src/Internal/CORSLoggerExtensions.cs +++ b/src/Middleware/CORS/src/CORSLoggerExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Cors.Internal +namespace Microsoft.AspNetCore.Cors { internal static class CORSLoggerExtensions { diff --git a/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs b/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs index d376370cc6..ed3f743dfc 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using Microsoft.AspNetCore.Cors.Internal; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; diff --git a/src/Middleware/CORS/src/Infrastructure/CorsService.cs b/src/Middleware/CORS/src/Infrastructure/CorsService.cs index 26c3bb042b..7552d81574 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsService.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsService.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using Microsoft.AspNetCore.Cors.Internal; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/src/DatabaseErrorPageMiddleware.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DatabaseErrorPageMiddleware.cs index 0183f402d3..26db9dcb22 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/DatabaseErrorPageMiddleware.cs +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DatabaseErrorPageMiddleware.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal; using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/src/Internal/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs similarity index 99% rename from src/Middleware/Diagnostics.EntityFrameworkCore/src/Internal/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs rename to src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs index d7696a5bab..8128ac1baf 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/Internal/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal +namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore { internal static class DiagnosticsEntityFrameworkCoreLoggerExtensions { diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/src/MigrationsEndPointMiddleware.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/src/MigrationsEndPointMiddleware.cs index 4562bf4218..0a37bf7f3e 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/MigrationsEndPointMiddleware.cs +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/MigrationsEndPointMiddleware.cs @@ -5,7 +5,6 @@ using System; using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; diff --git a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddleware.cs b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddleware.cs index 437bad32f4..c503194d6c 100644 --- a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddleware.cs +++ b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddleware.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.Internal; using Microsoft.AspNetCore.Diagnostics.RazorViews; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; diff --git a/src/Middleware/Diagnostics/src/Internal/DiagnosticsLoggerExtensions.cs b/src/Middleware/Diagnostics/src/DiagnosticsLoggerExtensions.cs similarity index 97% rename from src/Middleware/Diagnostics/src/Internal/DiagnosticsLoggerExtensions.cs rename to src/Middleware/Diagnostics/src/DiagnosticsLoggerExtensions.cs index 347cc622b1..995bbc6786 100644 --- a/src/Middleware/Diagnostics/src/Internal/DiagnosticsLoggerExtensions.cs +++ b/src/Middleware/Diagnostics/src/DiagnosticsLoggerExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Diagnostics.Internal +namespace Microsoft.AspNetCore.Diagnostics { internal static class DiagnosticsLoggerExtensions { diff --git a/src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerMiddleware.cs b/src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerMiddleware.cs index e7c324f8bb..eece3f0135 100644 --- a/src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerMiddleware.cs +++ b/src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerMiddleware.cs @@ -6,7 +6,6 @@ using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.Internal; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Middleware/HttpsPolicy/src/internal/HstsLoggingExtensions.cs b/src/Middleware/HttpsPolicy/src/HstsLoggingExtensions.cs similarity index 96% rename from src/Middleware/HttpsPolicy/src/internal/HstsLoggingExtensions.cs rename to src/Middleware/HttpsPolicy/src/HstsLoggingExtensions.cs index b9e495db56..82bf87c173 100644 --- a/src/Middleware/HttpsPolicy/src/internal/HstsLoggingExtensions.cs +++ b/src/Middleware/HttpsPolicy/src/HstsLoggingExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.HttpsPolicy.Internal +namespace Microsoft.AspNetCore.HttpsPolicy { internal static class HstsLoggingExtensions { diff --git a/src/Middleware/HttpsPolicy/src/HstsMiddleware.cs b/src/Middleware/HttpsPolicy/src/HstsMiddleware.cs index d192785064..80f92a6443 100644 --- a/src/Middleware/HttpsPolicy/src/HstsMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HstsMiddleware.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Globalization; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.HttpsPolicy.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/src/Middleware/HttpsPolicy/src/internal/HttpsLoggingExtensions.cs b/src/Middleware/HttpsPolicy/src/HttpsLoggingExtensions.cs similarity index 98% rename from src/Middleware/HttpsPolicy/src/internal/HttpsLoggingExtensions.cs rename to src/Middleware/HttpsPolicy/src/HttpsLoggingExtensions.cs index 4bbf6b1904..cc71022f68 100644 --- a/src/Middleware/HttpsPolicy/src/internal/HttpsLoggingExtensions.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsLoggingExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.HttpsPolicy.Internal +namespace Microsoft.AspNetCore.HttpsPolicy { internal static class HttpsLoggingExtensions { diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs index 72b63f578f..1e860a0e87 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; -using Microsoft.AspNetCore.HttpsPolicy.Internal; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Middleware/Localization/src/Internal/RequestCultureProviderLoggerExtensions.cs b/src/Middleware/Localization/src/RequestCultureProviderLoggerExtensions.cs similarity index 96% rename from src/Middleware/Localization/src/Internal/RequestCultureProviderLoggerExtensions.cs rename to src/Middleware/Localization/src/RequestCultureProviderLoggerExtensions.cs index c8583ce486..a35d8ede63 100644 --- a/src/Middleware/Localization/src/Internal/RequestCultureProviderLoggerExtensions.cs +++ b/src/Middleware/Localization/src/RequestCultureProviderLoggerExtensions.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.Localization.Internal +namespace Microsoft.AspNetCore.Localization { internal static class RequestCultureProviderLoggerExtensions { diff --git a/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs b/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs index f91260f63d..c6ec3e1c06 100644 --- a/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs +++ b/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Localization.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CacheEntryHelpers.cs b/src/Middleware/ResponseCaching/src/CacheEntry/CacheEntryHelpers.cs similarity index 97% rename from src/Middleware/ResponseCaching/src/Internal/CacheEntry/CacheEntryHelpers.cs rename to src/Middleware/ResponseCaching/src/CacheEntry/CacheEntryHelpers.cs index 842e56cbf3..de97be1f0f 100644 --- a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CacheEntryHelpers.cs +++ b/src/Middleware/ResponseCaching/src/CacheEntry/CacheEntryHelpers.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal static class CacheEntryHelpers { diff --git a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedResponse.cs b/src/Middleware/ResponseCaching/src/CacheEntry/CachedResponse.cs similarity index 89% rename from src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedResponse.cs rename to src/Middleware/ResponseCaching/src/CacheEntry/CachedResponse.cs index b7713843a9..e880691333 100644 --- a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedResponse.cs +++ b/src/Middleware/ResponseCaching/src/CacheEntry/CachedResponse.cs @@ -5,7 +5,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class CachedResponse : IResponseCacheEntry { diff --git a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedVaryByRules.cs b/src/Middleware/ResponseCaching/src/CacheEntry/CachedVaryByRules.cs similarity index 88% rename from src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedVaryByRules.cs rename to src/Middleware/ResponseCaching/src/CacheEntry/CachedVaryByRules.cs index e9dc67024a..6b8023440e 100644 --- a/src/Middleware/ResponseCaching/src/Internal/CacheEntry/CachedVaryByRules.cs +++ b/src/Middleware/ResponseCaching/src/CacheEntry/CachedVaryByRules.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class CachedVaryByRules : IResponseCacheEntry { diff --git a/src/Middleware/ResponseCaching/src/Internal/FastGuid.cs b/src/Middleware/ResponseCaching/src/FastGuid.cs similarity index 97% rename from src/Middleware/ResponseCaching/src/Internal/FastGuid.cs rename to src/Middleware/ResponseCaching/src/FastGuid.cs index 571227516b..0570f13351 100644 --- a/src/Middleware/ResponseCaching/src/Internal/FastGuid.cs +++ b/src/Middleware/ResponseCaching/src/FastGuid.cs @@ -4,7 +4,7 @@ using System; using System.Threading; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class FastGuid { diff --git a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCache.cs b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCache.cs similarity index 97% rename from src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCache.cs rename to src/Middleware/ResponseCaching/src/Interfaces/IResponseCache.cs index f76c5d7452..4ca2c6e8d1 100644 --- a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCache.cs +++ b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCache.cs @@ -4,7 +4,7 @@ using System; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal interface IResponseCache { diff --git a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCacheEntry.cs b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCacheEntry.cs similarity index 80% rename from src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCacheEntry.cs rename to src/Middleware/ResponseCaching/src/Interfaces/IResponseCacheEntry.cs index c27570b899..62590c33d7 100644 --- a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCacheEntry.cs +++ b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCacheEntry.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.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal interface IResponseCacheEntry { diff --git a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingKeyProvider.cs b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingKeyProvider.cs similarity index 95% rename from src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingKeyProvider.cs rename to src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingKeyProvider.cs index 22da5aec00..b3ce9fc4a7 100644 --- a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingKeyProvider.cs +++ b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingKeyProvider.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal interface IResponseCachingKeyProvider { diff --git a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingPolicyProvider.cs b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingPolicyProvider.cs similarity index 97% rename from src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingPolicyProvider.cs rename to src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingPolicyProvider.cs index 8862b74f4c..3717971e9a 100644 --- a/src/Middleware/ResponseCaching/src/Internal/Interfaces/IResponseCachingPolicyProvider.cs +++ b/src/Middleware/ResponseCaching/src/Interfaces/IResponseCachingPolicyProvider.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.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal interface IResponseCachingPolicyProvider { diff --git a/src/Middleware/ResponseCaching/src/Internal/Interfaces/ISystemClock.cs b/src/Middleware/ResponseCaching/src/Interfaces/ISystemClock.cs similarity index 89% rename from src/Middleware/ResponseCaching/src/Internal/Interfaces/ISystemClock.cs rename to src/Middleware/ResponseCaching/src/Interfaces/ISystemClock.cs index 4b560e3dad..c68f982927 100644 --- a/src/Middleware/ResponseCaching/src/Internal/Interfaces/ISystemClock.cs +++ b/src/Middleware/ResponseCaching/src/Interfaces/ISystemClock.cs @@ -3,7 +3,7 @@ using System; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { /// /// Abstracts the system clock to facilitate testing. diff --git a/src/Middleware/ResponseCaching/src/Internal/LoggerExtensions.cs b/src/Middleware/ResponseCaching/src/LoggerExtensions.cs similarity index 99% rename from src/Middleware/ResponseCaching/src/Internal/LoggerExtensions.cs rename to src/Middleware/ResponseCaching/src/LoggerExtensions.cs index c77dc3bfa3..f45bc2fb87 100644 --- a/src/Middleware/ResponseCaching/src/Internal/LoggerExtensions.cs +++ b/src/Middleware/ResponseCaching/src/LoggerExtensions.cs @@ -5,7 +5,7 @@ using System; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { /// /// Defines *all* the logger messages produced by response caching diff --git a/src/Middleware/ResponseCaching/src/Internal/MemoryCachedResponse.cs b/src/Middleware/ResponseCaching/src/MemoryCachedResponse.cs similarity index 91% rename from src/Middleware/ResponseCaching/src/Internal/MemoryCachedResponse.cs rename to src/Middleware/ResponseCaching/src/MemoryCachedResponse.cs index d24e63a9ff..1a96453502 100644 --- a/src/Middleware/ResponseCaching/src/Internal/MemoryCachedResponse.cs +++ b/src/Middleware/ResponseCaching/src/MemoryCachedResponse.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class MemoryCachedResponse { diff --git a/src/Middleware/ResponseCaching/src/Internal/MemoryResponseCache.cs b/src/Middleware/ResponseCaching/src/MemoryResponseCache.cs similarity index 98% rename from src/Middleware/ResponseCaching/src/Internal/MemoryResponseCache.cs rename to src/Middleware/ResponseCaching/src/MemoryResponseCache.cs index 10eb67aaa9..554ab361d8 100644 --- a/src/Middleware/ResponseCaching/src/Internal/MemoryResponseCache.cs +++ b/src/Middleware/ResponseCaching/src/MemoryResponseCache.cs @@ -5,7 +5,7 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class MemoryResponseCache : IResponseCache { diff --git a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingContext.cs b/src/Middleware/ResponseCaching/src/ResponseCachingContext.cs similarity index 98% rename from src/Middleware/ResponseCaching/src/Internal/ResponseCachingContext.cs rename to src/Middleware/ResponseCaching/src/ResponseCachingContext.cs index e135583d4a..53ec2fbdb2 100644 --- a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingContext.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingContext.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class ResponseCachingContext { diff --git a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingKeyProvider.cs b/src/Middleware/ResponseCaching/src/ResponseCachingKeyProvider.cs similarity index 99% rename from src/Middleware/ResponseCaching/src/Internal/ResponseCachingKeyProvider.cs rename to src/Middleware/ResponseCaching/src/ResponseCachingKeyProvider.cs index 6b9b654404..f35a28f7b6 100644 --- a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingKeyProvider.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingKeyProvider.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class ResponseCachingKeyProvider : IResponseCachingKeyProvider { diff --git a/src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs b/src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs index d936729197..b370841e8e 100644 --- a/src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Logging; using Microsoft.Extensions.ObjectPool; diff --git a/src/Middleware/ResponseCaching/src/ResponseCachingOptions.cs b/src/Middleware/ResponseCaching/src/ResponseCachingOptions.cs index 4fa75e2135..0a97efa7e3 100644 --- a/src/Middleware/ResponseCaching/src/ResponseCachingOptions.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingOptions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.ComponentModel; -using Microsoft.AspNetCore.ResponseCaching.Internal; namespace Microsoft.AspNetCore.ResponseCaching { diff --git a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingPolicyProvider.cs b/src/Middleware/ResponseCaching/src/ResponseCachingPolicyProvider.cs similarity index 99% rename from src/Middleware/ResponseCaching/src/Internal/ResponseCachingPolicyProvider.cs rename to src/Middleware/ResponseCaching/src/ResponseCachingPolicyProvider.cs index 54a045c5af..3cb94ab005 100644 --- a/src/Middleware/ResponseCaching/src/Internal/ResponseCachingPolicyProvider.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingPolicyProvider.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class ResponseCachingPolicyProvider : IResponseCachingPolicyProvider { diff --git a/src/Middleware/ResponseCaching/src/ResponseCachingServicesExtensions.cs b/src/Middleware/ResponseCaching/src/ResponseCachingServicesExtensions.cs index eccb641b59..bbcbc38999 100644 --- a/src/Middleware/ResponseCaching/src/ResponseCachingServicesExtensions.cs +++ b/src/Middleware/ResponseCaching/src/ResponseCachingServicesExtensions.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.ResponseCaching; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.ObjectPool; diff --git a/src/Middleware/ResponseCaching/src/Internal/SendFileFeatureWrapper.cs b/src/Middleware/ResponseCaching/src/SendFileFeatureWrapper.cs similarity index 95% rename from src/Middleware/ResponseCaching/src/Internal/SendFileFeatureWrapper.cs rename to src/Middleware/ResponseCaching/src/SendFileFeatureWrapper.cs index 65ac5850f8..edc71edd76 100644 --- a/src/Middleware/ResponseCaching/src/Internal/SendFileFeatureWrapper.cs +++ b/src/Middleware/ResponseCaching/src/SendFileFeatureWrapper.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Features; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class SendFileFeatureWrapper : IHttpSendFileFeature { diff --git a/src/Middleware/ResponseCaching/src/Streams/ResponseCachingStream.cs b/src/Middleware/ResponseCaching/src/Streams/ResponseCachingStream.cs index 6a0c162be4..a788778e94 100644 --- a/src/Middleware/ResponseCaching/src/Streams/ResponseCachingStream.cs +++ b/src/Middleware/ResponseCaching/src/Streams/ResponseCachingStream.cs @@ -6,7 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class ResponseCachingStream : Stream { diff --git a/src/Middleware/ResponseCaching/src/Streams/SegmentReadStream.cs b/src/Middleware/ResponseCaching/src/Streams/SegmentReadStream.cs index 8234d135a9..35958933e0 100644 --- a/src/Middleware/ResponseCaching/src/Streams/SegmentReadStream.cs +++ b/src/Middleware/ResponseCaching/src/Streams/SegmentReadStream.cs @@ -7,7 +7,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class SegmentReadStream : Stream { diff --git a/src/Middleware/ResponseCaching/src/Streams/SegmentWriteStream.cs b/src/Middleware/ResponseCaching/src/Streams/SegmentWriteStream.cs index 81df72a9d1..9faa32ca76 100644 --- a/src/Middleware/ResponseCaching/src/Streams/SegmentWriteStream.cs +++ b/src/Middleware/ResponseCaching/src/Streams/SegmentWriteStream.cs @@ -7,7 +7,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal class SegmentWriteStream : Stream { diff --git a/src/Middleware/ResponseCaching/src/Streams/StreamUtilities.cs b/src/Middleware/ResponseCaching/src/Streams/StreamUtilities.cs index d128a9f8f2..0303e43fbf 100644 --- a/src/Middleware/ResponseCaching/src/Streams/StreamUtilities.cs +++ b/src/Middleware/ResponseCaching/src/Streams/StreamUtilities.cs @@ -5,7 +5,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal static class StreamUtilities { diff --git a/src/Middleware/ResponseCaching/src/Internal/StringBuilderExtensions.cs b/src/Middleware/ResponseCaching/src/StringBuilderExtensions.cs similarity index 92% rename from src/Middleware/ResponseCaching/src/Internal/StringBuilderExtensions.cs rename to src/Middleware/ResponseCaching/src/StringBuilderExtensions.cs index 40169d66bc..f0ed673859 100644 --- a/src/Middleware/ResponseCaching/src/Internal/StringBuilderExtensions.cs +++ b/src/Middleware/ResponseCaching/src/StringBuilderExtensions.cs @@ -3,7 +3,7 @@ using System.Text; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { internal static class StringBuilderExtensions { diff --git a/src/Middleware/ResponseCaching/src/Internal/SystemClock.cs b/src/Middleware/ResponseCaching/src/SystemClock.cs similarity index 89% rename from src/Middleware/ResponseCaching/src/Internal/SystemClock.cs rename to src/Middleware/ResponseCaching/src/SystemClock.cs index e4462d803f..c08ddc4f0d 100644 --- a/src/Middleware/ResponseCaching/src/Internal/SystemClock.cs +++ b/src/Middleware/ResponseCaching/src/SystemClock.cs @@ -3,7 +3,7 @@ using System; -namespace Microsoft.AspNetCore.ResponseCaching.Internal +namespace Microsoft.AspNetCore.ResponseCaching { /// /// Provides access to the normal system clock. diff --git a/src/Middleware/ResponseCaching/test/ResponseCachingKeyProviderTests.cs b/src/Middleware/ResponseCaching/test/ResponseCachingKeyProviderTests.cs index 36bd3da0c8..b207b601ac 100644 --- a/src/Middleware/ResponseCaching/test/ResponseCachingKeyProviderTests.cs +++ b/src/Middleware/ResponseCaching/test/ResponseCachingKeyProviderTests.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Xunit; namespace Microsoft.AspNetCore.ResponseCaching.Tests diff --git a/src/Middleware/ResponseCaching/test/ResponseCachingMiddlewareTests.cs b/src/Middleware/ResponseCaching/test/ResponseCachingMiddlewareTests.cs index 2fb9849993..43970711ea 100644 --- a/src/Middleware/ResponseCaching/test/ResponseCachingMiddlewareTests.cs +++ b/src/Middleware/ResponseCaching/test/ResponseCachingMiddlewareTests.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Logging.Testing; using Microsoft.Extensions.Primitives; diff --git a/src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs b/src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs index 4f1307b4bc..8c3f55c367 100644 --- a/src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs +++ b/src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/src/Middleware/ResponseCaching/test/SegmentReadStreamTests.cs b/src/Middleware/ResponseCaching/test/SegmentReadStreamTests.cs index 5247df3096..6520f785a0 100644 --- a/src/Middleware/ResponseCaching/test/SegmentReadStreamTests.cs +++ b/src/Middleware/ResponseCaching/test/SegmentReadStreamTests.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Xunit; namespace Microsoft.AspNetCore.ResponseCaching.Tests diff --git a/src/Middleware/ResponseCaching/test/SegmentWriteStreamTests.cs b/src/Middleware/ResponseCaching/test/SegmentWriteStreamTests.cs index 6043128e7b..251b7e8777 100644 --- a/src/Middleware/ResponseCaching/test/SegmentWriteStreamTests.cs +++ b/src/Middleware/ResponseCaching/test/SegmentWriteStreamTests.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Linq; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Xunit; namespace Microsoft.AspNetCore.ResponseCaching.Tests diff --git a/src/Middleware/ResponseCaching/test/TestUtils.cs b/src/Middleware/ResponseCaching/test/TestUtils.cs index 319c1d590f..d98ba511bb 100644 --- a/src/Middleware/ResponseCaching/test/TestUtils.cs +++ b/src/Middleware/ResponseCaching/test/TestUtils.cs @@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.ResponseCaching.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -22,7 +21,7 @@ using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; using Xunit; -using ISystemClock = Microsoft.AspNetCore.ResponseCaching.Internal.ISystemClock; +using ISystemClock = Microsoft.AspNetCore.ResponseCaching.ISystemClock; namespace Microsoft.AspNetCore.ResponseCaching.Tests { diff --git a/src/Middleware/ResponseCompression/src/internal/ResponseCompressionLoggingExtensions.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionLoggingExtensions.cs similarity index 98% rename from src/Middleware/ResponseCompression/src/internal/ResponseCompressionLoggingExtensions.cs rename to src/Middleware/ResponseCompression/src/ResponseCompressionLoggingExtensions.cs index bf16682498..114bd69fdb 100644 --- a/src/Middleware/ResponseCompression/src/internal/ResponseCompressionLoggingExtensions.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionLoggingExtensions.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.ResponseCompression.Internal +namespace Microsoft.AspNetCore.ResponseCompression { internal static class ResponseCompressionLoggingExtensions { diff --git a/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs index a0e00b077a..ad29ab7b2c 100644 --- a/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.ResponseCompression.Internal; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs b/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs index 6dff9e0d5e..4a2f965186 100644 --- a/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs +++ b/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs @@ -69,642 +69,3 @@ namespace Microsoft.AspNetCore.Rewrite SkipRemainingRules = 2, } } -namespace Microsoft.AspNetCore.Rewrite.Internal -{ - public partial class BackReferenceCollection - { - public BackReferenceCollection(string reference) { } - public BackReferenceCollection(System.Text.RegularExpressions.GroupCollection references) { } - public string this[int index] { get { throw null; } } - public void Add(Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection references) { } - } - public partial class DelegateRule : Microsoft.AspNetCore.Rewrite.IRule - { - public DelegateRule(System.Action onApplyRule) { } - public void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class MatchResults - { - public static readonly Microsoft.AspNetCore.Rewrite.Internal.MatchResults EmptyFailure; - public static readonly Microsoft.AspNetCore.Rewrite.Internal.MatchResults EmptySuccess; - public MatchResults() { } - public Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection BackReferences { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class ParserContext - { - public readonly string Template; - public ParserContext(string condition) { } - public char Current { get { throw null; } } - public int Index { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Back() { throw null; } - public string Capture() { throw null; } - public int GetIndex() { throw null; } - public bool HasNext() { throw null; } - public void Mark() { } - public bool Next() { throw null; } - } - public partial class Pattern - { - public Pattern(System.Collections.Generic.IList patternSegments) { } - public System.Collections.Generic.IList PatternSegments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public abstract partial class PatternSegment - { - protected PatternSegment() { } - public abstract string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences); - } - public partial class RedirectRule : Microsoft.AspNetCore.Rewrite.IRule - { - public RedirectRule(string regex, string replacement, int statusCode) { } - public System.Text.RegularExpressions.Regex InitialMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Replacement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class RedirectToHttpsRule : Microsoft.AspNetCore.Rewrite.IRule - { - public RedirectToHttpsRule() { } - public int? SSLPort { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class RedirectToWwwRule : Microsoft.AspNetCore.Rewrite.IRule - { - public readonly string[] _domains; - public readonly int _statusCode; - public RedirectToWwwRule(int statusCode) { } - public RedirectToWwwRule(int statusCode, params string[] domains) { } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class RewriteRule : Microsoft.AspNetCore.Rewrite.IRule - { - public RewriteRule(string regex, string replacement, bool stopProcessing) { } - public System.Text.RegularExpressions.Regex InitialMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Replacement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool StopProcessing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public abstract partial class UrlAction - { - protected UrlAction() { } - protected Microsoft.AspNetCore.Rewrite.Internal.Pattern Url { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public abstract void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences); - } - public abstract partial class UrlMatch - { - protected UrlMatch() { } - protected bool Negate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public abstract Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string input, Microsoft.AspNetCore.Rewrite.RewriteContext context); - } -} -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite -{ - public partial class ApacheModRewriteRule : Microsoft.AspNetCore.Rewrite.IRule - { - public ApacheModRewriteRule(Microsoft.AspNetCore.Rewrite.Internal.UrlMatch initialMatch, System.Collections.Generic.IList conditions, System.Collections.Generic.IList urlActions) { } - public System.Collections.Generic.IList Actions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.IList Conditions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.UrlMatch InitialMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class Condition - { - public Condition() { } - public Microsoft.AspNetCore.Rewrite.Internal.Pattern Input { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.UrlMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool OrNext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public static partial class ConditionEvaluator - { - public static Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(System.Collections.Generic.IEnumerable conditions, Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection backReferences) { throw null; } - public static Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(System.Collections.Generic.IEnumerable conditions, Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection backReferences, bool trackAllCaptures) { throw null; } - } - public partial class ConditionPatternParser - { - public ConditionPatternParser() { } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput ParseActionCondition(string condition) { throw null; } - } - public enum ConditionType - { - Regex = 0, - PropertyTest = 1, - StringComp = 2, - IntComp = 3, - } - public partial class CookieActionFactory - { - public CookieActionFactory() { } - public Microsoft.AspNetCore.Rewrite.Internal.UrlActions.ChangeCookieAction Create(string flagValue) { throw null; } - } - public partial class FileParser - { - public FileParser() { } - public System.Collections.Generic.IList Parse(System.IO.TextReader input) { throw null; } - } - public partial class FlagParser - { - public FlagParser() { } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags Parse(string flagString) { throw null; } - } - public partial class Flags - { - public Flags() { } - public Flags(System.Collections.Generic.IDictionary flags) { } - public System.Collections.Generic.IDictionary FlagDictionary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string this[Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType flag] { get { throw null; } set { } } - public bool GetValue(Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType flag, out string value) { throw null; } - public bool HasFlag(Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType flag) { throw null; } - public void SetFlag(Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType flag, string value) { } - } - public enum FlagType - { - EscapeBackreference = 0, - Chain = 1, - Cookie = 2, - DiscardPath = 3, - Env = 4, - End = 5, - Forbidden = 6, - Gone = 7, - Handler = 8, - Last = 9, - Next = 10, - NoCase = 11, - NoEscape = 12, - NoSubReq = 13, - NoVary = 14, - Or = 15, - Proxy = 16, - PassThrough = 17, - QSAppend = 18, - QSDiscard = 19, - QSLast = 20, - Redirect = 21, - Skip = 22, - Type = 23, - } - public enum OperationType - { - None = 0, - Equal = 1, - Greater = 2, - GreaterEqual = 3, - Less = 4, - LessEqual = 5, - NotEqual = 6, - Directory = 7, - RegularFile = 8, - ExistingFile = 9, - SymbolicLink = 10, - Size = 11, - ExistingUrl = 12, - Executable = 13, - } - public partial class ParsedModRewriteInput - { - public ParsedModRewriteInput() { } - public ParsedModRewriteInput(bool invert, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType conditionType, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType operationType, string operand) { } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType ConditionType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Invert { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Operand { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType OperationType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class RuleBuilder - { - public RuleBuilder() { } - public void AddAction(Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags flags) { } - public void AddConditionFromParts(Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput input, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags flags) { } - public void AddMatch(Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput input, Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags flags) { } - public void AddRule(string rule) { } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ApacheModRewriteRule Build() { throw null; } - } - public partial class RuleRegexParser - { - public RuleRegexParser() { } - public Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput ParseRuleRegex(string regex) { throw null; } - } - public enum SegmentType - { - Literal = 0, - ServerParameter = 1, - ConditionParameter = 2, - RuleParameter = 3, - } - public static partial class ServerVariables - { - public static Microsoft.AspNetCore.Rewrite.Internal.PatternSegment FindServerVariable(string serverVariable, Microsoft.AspNetCore.Rewrite.Internal.ParserContext context) { throw null; } - } - public partial class TestStringParser - { - public TestStringParser() { } - public Microsoft.AspNetCore.Rewrite.Internal.Pattern Parse(string testString) { throw null; } - } - public partial class Tokenizer - { - public Tokenizer() { } - public System.Collections.Generic.IList Tokenize(string rule) { throw null; } - } -} -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite -{ - public enum ActionType - { - None = 0, - Rewrite = 1, - Redirect = 2, - CustomResponse = 3, - AbortRequest = 4, - } - public partial class Condition - { - public Condition() { } - public Microsoft.AspNetCore.Rewrite.Internal.Pattern Input { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.UrlMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class ConditionCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - public ConditionCollection() { } - public ConditionCollection(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping grouping, bool trackAllCaptures) { } - public int Count { get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping Grouping { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition this[int index] { get { throw null; } } - public bool TrackAllCaptures { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void Add(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition condition) { } - public void AddConditions(System.Collections.Generic.IEnumerable conditions) { } - public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public static partial class ConditionEvaluator - { - public static Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection conditions, Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection backReferences) { throw null; } - } - public partial class IISRewriteMap - { - public IISRewriteMap(string name) { } - public string this[string key] { get { throw null; } set { } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public partial class IISRewriteMapCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - public IISRewriteMapCollection() { } - public int Count { get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap this[string key] { get { throw null; } } - public void Add(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap rewriteMap) { } - public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class IISUrlRewriteRule : Microsoft.AspNetCore.Rewrite.IRule - { - public IISUrlRewriteRule(string name, Microsoft.AspNetCore.Rewrite.Internal.UrlMatch initialMatch, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection conditions, Microsoft.AspNetCore.Rewrite.Internal.UrlAction action) { } - public IISUrlRewriteRule(string name, Microsoft.AspNetCore.Rewrite.Internal.UrlMatch initialMatch, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection conditions, Microsoft.AspNetCore.Rewrite.Internal.UrlAction action, bool global) { } - public Microsoft.AspNetCore.Rewrite.Internal.UrlAction Action { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection Conditions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool Global { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Rewrite.Internal.UrlMatch InitialMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public virtual void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context) { } - } - public partial class InputParser - { - public InputParser() { } - public InputParser(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMapCollection rewriteMaps, bool alwaysUseManagedServerVariables) { } - public Microsoft.AspNetCore.Rewrite.Internal.Pattern ParseInputString(string testString) { throw null; } - public Microsoft.AspNetCore.Rewrite.Internal.Pattern ParseInputString(string testString, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart uriMatchPart) { throw null; } - } - public partial class InvalidUrlRewriteFormatException : System.FormatException - { - public InvalidUrlRewriteFormatException(System.Xml.Linq.XElement element, string message) { } - public InvalidUrlRewriteFormatException(System.Xml.Linq.XElement element, string message, System.Exception innerException) { } - public int LineNumber { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int LinePosition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public enum LogicalGrouping - { - MatchAll = 0, - MatchAny = 1, - } - public enum MatchType - { - Pattern = 0, - IsFile = 1, - IsDirectory = 2, - } - public enum PatternSyntax - { - ECMAScript = 0, - Wildcard = 1, - ExactMatch = 2, - } - public enum RedirectType - { - Permanent = 301, - Found = 302, - SeeOther = 303, - Temporary = 307, - } - public static partial class RewriteMapParser - { - public static Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMapCollection Parse(System.Xml.Linq.XElement xmlRoot) { throw null; } - } - public static partial class RewriteTags - { - public const string Action = "action"; - public const string Add = "add"; - public const string AppendQueryString = "appendQueryString"; - public const string Conditions = "conditions"; - public const string Enabled = "enabled"; - public const string GlobalRules = "globalRules"; - public const string IgnoreCase = "ignoreCase"; - public const string Input = "input"; - public const string Key = "key"; - public const string LogicalGrouping = "logicalGrouping"; - public const string LogRewrittenUrl = "logRewrittenUrl"; - public const string Match = "match"; - public const string MatchPattern = "matchPattern"; - public const string MatchType = "matchType"; - public const string Name = "name"; - public const string Negate = "negate"; - public const string Pattern = "pattern"; - public const string PatternSyntax = "patternSyntax"; - public const string RedirectType = "redirectType"; - public const string Rewrite = "rewrite"; - public const string RewriteMap = "rewriteMap"; - public const string RewriteMaps = "rewriteMaps"; - public const string Rule = "rule"; - public const string Rules = "rules"; - public const string StatusCode = "statusCode"; - public const string StatusDescription = "statusDescription"; - public const string StatusReason = "statusReason"; - public const string StopProcessing = "stopProcessing"; - public const string SubStatusCode = "subStatusCode"; - public const string TrackAllCaptures = "trackAllCaptures"; - public const string Type = "type"; - public const string Url = "url"; - public const string Value = "value"; - } - public static partial class ServerVariables - { - public static Microsoft.AspNetCore.Rewrite.Internal.PatternSegment FindServerVariable(string serverVariable, Microsoft.AspNetCore.Rewrite.Internal.ParserContext context, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart uriMatchPart, bool alwaysUseManagedServerVariables) { throw null; } - } - public partial class UriMatchCondition : Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition - { - public UriMatchCondition(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.InputParser inputParser, string input, string pattern, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart uriMatchPart, bool ignoreCase, bool negate) { } - } - public enum UriMatchPart - { - Full = 0, - Path = 1, - } - public partial class UrlRewriteFileParser - { - public UrlRewriteFileParser() { } - public System.Collections.Generic.IList Parse(System.IO.TextReader reader, bool alwaysUseManagedServerVariables) { throw null; } - } - public partial class UrlRewriteRuleBuilder - { - public UrlRewriteRuleBuilder() { } - public bool Enabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Global { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart UriMatchPart { get { throw null; } } - public void AddUrlAction(Microsoft.AspNetCore.Rewrite.Internal.UrlAction action) { } - public void AddUrlCondition(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition condition) { } - public void AddUrlConditions(System.Collections.Generic.IEnumerable conditions) { } - public void AddUrlMatch(string input, bool ignoreCase = true, bool negate = false, Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.PatternSyntax patternSyntax = Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.PatternSyntax.ECMAScript) { } - public Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISUrlRewriteRule Build() { throw null; } - public void ConfigureConditionBehavior(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping logicalGrouping, bool trackAllCaptures) { } - } -} -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments -{ - public partial class ConditionMatchSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public ConditionMatchSegment(int index) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class DateTimeSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public DateTimeSegment(string segment) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReference) { throw null; } - } - public partial class HeaderSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public HeaderSegment(string header) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class IsHttpsModSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public IsHttpsModSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class IsHttpsUrlSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public IsHttpsUrlSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class IsIPV6Segment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public IsIPV6Segment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class LiteralSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public LiteralSegment(string literal) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class LocalAddressSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public LocalAddressSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class LocalPortSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public LocalPortSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class QueryStringSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public QueryStringSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackRefernces, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RemoteAddressSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RemoteAddressSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RemotePortSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RemotePortSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RequestFileNameSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RequestFileNameSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RequestMethodSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RequestMethodSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RewriteMapSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RewriteMapSegment(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap rewriteMap, Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class RuleMatchSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public RuleMatchSegment(int index) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class SchemeSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public SchemeSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class ServerProtocolSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public ServerProtocolSegment() { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class ToLowerSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public ToLowerSegment(Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class UrlEncodeSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public UrlEncodeSegment(Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } - public partial class UrlSegment : Microsoft.AspNetCore.Rewrite.Internal.PatternSegment - { - public UrlSegment() { } - public UrlSegment(Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart uriMatchPart) { } - public override string Evaluate(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { throw null; } - } -} -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions -{ - public partial class AbortAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public AbortAction() { } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class ChangeCookieAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public ChangeCookieAction(string name) { } - public string Domain { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool HttpOnly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.TimeSpan Lifetime { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Path { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Secure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class CustomResponseAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public CustomResponseAction(int statusCode) { } - public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string StatusDescription { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string StatusReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class ForbiddenAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public ForbiddenAction() { } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class GoneAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public GoneAction() { } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class NoneAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public NoneAction(Microsoft.AspNetCore.Rewrite.RuleResult result) { } - public Microsoft.AspNetCore.Rewrite.RuleResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class RedirectAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public RedirectAction(int statusCode, Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, bool queryStringAppend) { } - public RedirectAction(int statusCode, Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, bool queryStringAppend, bool queryStringDelete, bool escapeBackReferences) { } - public bool EscapeBackReferences { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool QueryStringAppend { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool QueryStringDelete { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } - public partial class RewriteAction : Microsoft.AspNetCore.Rewrite.Internal.UrlAction - { - public RewriteAction(Microsoft.AspNetCore.Rewrite.RuleResult result, Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, bool queryStringAppend) { } - public RewriteAction(Microsoft.AspNetCore.Rewrite.RuleResult result, Microsoft.AspNetCore.Rewrite.Internal.Pattern pattern, bool queryStringAppend, bool queryStringDelete, bool escapeBackReferences) { } - public bool EscapeBackReferences { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool QueryStringAppend { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool QueryStringDelete { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Rewrite.RuleResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public override void ApplyAction(Microsoft.AspNetCore.Rewrite.RewriteContext context, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection ruleBackReferences, Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection conditionBackReferences) { } - } -} -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches -{ - public partial class ExactMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public ExactMatch(bool ignoreCase, string input, bool negate) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string pattern, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public partial class FileSizeMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public FileSizeMatch(bool negate) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string input, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public partial class IntegerMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public IntegerMatch(int value, Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerOperationType operation) { } - public IntegerMatch(string value, Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerOperationType operation) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string input, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public enum IntegerOperationType - { - Equal = 0, - Greater = 1, - GreaterEqual = 2, - Less = 3, - LessEqual = 4, - NotEqual = 5, - } - public partial class IsDirectoryMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public IsDirectoryMatch(bool negate) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string pattern, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public partial class IsFileMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public IsFileMatch(bool negate) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string pattern, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public partial class RegexMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public RegexMatch(System.Text.RegularExpressions.Regex match, bool negate) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string pattern, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public partial class StringMatch : Microsoft.AspNetCore.Rewrite.Internal.UrlMatch - { - public StringMatch(string value, Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.StringOperationType operation, bool ignoreCase) { } - public override Microsoft.AspNetCore.Rewrite.Internal.MatchResults Evaluate(string input, Microsoft.AspNetCore.Rewrite.RewriteContext context) { throw null; } - } - public enum StringOperationType - { - Equal = 0, - Greater = 1, - GreaterEqual = 2, - Less = 3, - LessEqual = 4, - } -} diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ApacheModRewriteRule.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ApacheModRewriteRule.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ApacheModRewriteRule.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ApacheModRewriteRule.cs index d93875fb7f..51f5f3355e 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ApacheModRewriteRule.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ApacheModRewriteRule.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class ApacheModRewriteRule : IRule + internal class ApacheModRewriteRule : IRule { public UrlMatch InitialMatch { get; } public IList Conditions { get; } diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Condition.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/Condition.cs similarity index 87% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Condition.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/Condition.cs index 01db0eb1bd..34a5698041 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Condition.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/Condition.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class Condition + internal class Condition { public Pattern Input { get; set; } public UrlMatch Match { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionEvaluator.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionEvaluator.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionEvaluator.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ConditionEvaluator.cs index 0038c5bab2..4785b1caab 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionEvaluator.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionEvaluator.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public static class ConditionEvaluator + internal static class ConditionEvaluator { public static MatchResults Evaluate(IEnumerable conditions, RewriteContext context, BackReferenceCollection backReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionPatternParser.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionPatternParser.cs similarity index 99% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionPatternParser.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ConditionPatternParser.cs index 53d841b0c7..a5b64c227a 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionPatternParser.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionPatternParser.cs @@ -4,13 +4,13 @@ using System; using System.Globalization; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { /// /// Parses the "CondPattern" portion of the RewriteCond. /// RewriteCond TestString CondPattern /// - public class ConditionPatternParser + internal class ConditionPatternParser { private const char Not = '!'; private const char Dash = '-'; diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionType.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionType.cs similarity index 73% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionType.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ConditionType.cs index 0624bbfede..fae17d1d8c 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ConditionType.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ConditionType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public enum ConditionType + internal enum ConditionType { Regex, PropertyTest, diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/CookieActionFactory.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/CookieActionFactory.cs similarity index 96% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/CookieActionFactory.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/CookieActionFactory.cs index 27cb805064..b4217f8b60 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/CookieActionFactory.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/CookieActionFactory.cs @@ -3,11 +3,11 @@ using System; using System.Globalization; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlActions; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class CookieActionFactory + internal class CookieActionFactory { /// /// Creates a for details. diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FileParser.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/FileParser.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FileParser.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/FileParser.cs index d301a401a3..8bb1fdf006 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FileParser.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/FileParser.cs @@ -5,9 +5,9 @@ using System; using System.Collections.Generic; using System.IO; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class FileParser + internal class FileParser { public IList Parse(TextReader input) { diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagParser.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/FlagParser.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagParser.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/FlagParser.cs index 3d736d7b56..b40d7c5322 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagParser.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/FlagParser.cs @@ -4,9 +4,9 @@ using System; using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class FlagParser + internal class FlagParser { private readonly IDictionary _ruleFlagLookup = new Dictionary(StringComparer.OrdinalIgnoreCase) { { "b", FlagType.EscapeBackreference}, diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagType.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/FlagType.cs similarity index 86% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagType.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/FlagType.cs index 67ea9875bf..7567428d34 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/FlagType.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/FlagType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public enum FlagType + internal enum FlagType { EscapeBackreference, Chain, diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Flags.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/Flags.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Flags.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/Flags.cs index 0f5fac2c25..a180d65ef8 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Flags.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/Flags.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { // For more information of flags, and what flags we currently support: // https://github.com/aspnet/BasicMiddleware/issues/66 // http://httpd.apache.org/docs/current/expr.html#vars - public class Flags + internal class Flags { public IDictionary FlagDictionary { get; } diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/OperationType.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/OperationType.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/OperationType.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/OperationType.cs index 1f22902d57..483fb0b03f 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/OperationType.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/OperationType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public enum OperationType + internal enum OperationType { None, Equal, diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ParsedModRewriteCondition.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ParsedModRewriteCondition.cs similarity index 87% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ParsedModRewriteCondition.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ParsedModRewriteCondition.cs index 759ab51307..df56fadf85 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ParsedModRewriteCondition.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ParsedModRewriteCondition.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class ParsedModRewriteInput + internal class ParsedModRewriteInput { public bool Invert { get; set; } public ConditionType ConditionType { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleBuilder.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/RuleBuilder.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleBuilder.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/RuleBuilder.cs index 2dd1c58c9e..b75db70da2 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleBuilder.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/RuleBuilder.cs @@ -6,12 +6,12 @@ using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class RuleBuilder + internal class RuleBuilder { private IList _conditions; internal IList _actions = new List(); diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleRegexParser.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/RuleRegexParser.cs similarity index 88% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleRegexParser.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/RuleRegexParser.cs index e8c0eeec69..7003926773 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/RuleRegexParser.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/RuleRegexParser.cs @@ -3,9 +3,9 @@ using System; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public class RuleRegexParser + internal class RuleRegexParser { public ParsedModRewriteInput ParseRuleRegex(string regex) { diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/SegmentType.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/SegmentType.cs similarity index 75% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/SegmentType.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/SegmentType.cs index ee47c978cf..1d67818d36 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/SegmentType.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/SegmentType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { - public enum SegmentType + internal enum SegmentType { Literal, ServerParameter, diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ServerVariables.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/ServerVariables.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ServerVariables.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/ServerVariables.cs index afb3a72053..fbebb2225c 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/ServerVariables.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/ServerVariables.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 Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { /// /// mod_rewrite lookups for specific string constants. /// - public static class ServerVariables + internal static class ServerVariables { /// diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/TestStringParser.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/TestStringParser.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/TestStringParser.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/TestStringParser.cs index 151a9c7c10..73bda20d1d 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/TestStringParser.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/TestStringParser.cs @@ -3,14 +3,14 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { /// /// Parses the TestString segment of the mod_rewrite condition. /// - public class TestStringParser + internal class TestStringParser { private const char Percent = '%'; private const char Dollar = '$'; diff --git a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Tokenizer.cs b/src/Middleware/Rewrite/src/ApacheModRewrite/Tokenizer.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Tokenizer.cs rename to src/Middleware/Rewrite/src/ApacheModRewrite/Tokenizer.cs index b9d19bd8c7..609e1b3e08 100644 --- a/src/Middleware/Rewrite/src/Internal/ApacheModRewrite/Tokenizer.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewrite/Tokenizer.cs @@ -5,12 +5,12 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite +namespace Microsoft.AspNetCore.Rewrite.ApacheModRewrite { /// /// Tokenizes a mod_rewrite rule, delimited by spaces. /// - public class Tokenizer + internal class Tokenizer { private const char Space = ' '; private const char Escape = '\\'; diff --git a/src/Middleware/Rewrite/src/ApacheModRewriteOptionsExtensions.cs b/src/Middleware/Rewrite/src/ApacheModRewriteOptionsExtensions.cs index b4779aece7..127de6647e 100644 --- a/src/Middleware/Rewrite/src/ApacheModRewriteOptionsExtensions.cs +++ b/src/Middleware/Rewrite/src/ApacheModRewriteOptionsExtensions.cs @@ -3,7 +3,7 @@ using System; using System.IO; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Microsoft.Extensions.FileProviders; namespace Microsoft.AspNetCore.Rewrite diff --git a/src/Middleware/Rewrite/src/Internal/BackReferenceCollection.cs b/src/Middleware/Rewrite/src/BackReferenceCollection.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/BackReferenceCollection.cs rename to src/Middleware/Rewrite/src/BackReferenceCollection.cs index 32b91a19ce..439946129b 100644 --- a/src/Middleware/Rewrite/src/Internal/BackReferenceCollection.cs +++ b/src/Middleware/Rewrite/src/BackReferenceCollection.cs @@ -5,9 +5,9 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class BackReferenceCollection + internal class BackReferenceCollection { private List _backReferences = new List(); diff --git a/src/Middleware/Rewrite/src/Internal/DelegateRule.cs b/src/Middleware/Rewrite/src/DelegateRule.cs similarity index 84% rename from src/Middleware/Rewrite/src/Internal/DelegateRule.cs rename to src/Middleware/Rewrite/src/DelegateRule.cs index ab8e75d1bf..7355ae5055 100644 --- a/src/Middleware/Rewrite/src/Internal/DelegateRule.cs +++ b/src/Middleware/Rewrite/src/DelegateRule.cs @@ -3,9 +3,9 @@ using System; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class DelegateRule : IRule + internal class DelegateRule : IRule { private readonly Action _onApplyRule; diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ActionType.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/ActionType.cs similarity index 75% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ActionType.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/ActionType.cs index 75bda6efa7..b38fd0e2a3 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ActionType.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/ActionType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum ActionType + internal enum ActionType { None, Rewrite, diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/Condition.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/Condition.cs similarity index 87% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/Condition.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/Condition.cs index 18a24c1925..e453a1563a 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/Condition.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/Condition.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class Condition + internal class Condition { public Pattern Input { get; set; } public UrlMatch Match { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionCollection.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/ConditionCollection.cs similarity index 93% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionCollection.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/ConditionCollection.cs index 3aec4fe960..000eda85f6 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionCollection.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/ConditionCollection.cs @@ -5,9 +5,9 @@ using System; using System.Collections; using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class ConditionCollection : IEnumerable + internal class ConditionCollection : IEnumerable { private readonly List _conditions = new List(); diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionEvaluator.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/ConditionEvaluator.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionEvaluator.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/ConditionEvaluator.cs index 2d50739e78..c3d9f5e945 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ConditionEvaluator.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/ConditionEvaluator.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public static class ConditionEvaluator + internal static class ConditionEvaluator { public static MatchResults Evaluate(ConditionCollection conditions, RewriteContext context, BackReferenceCollection backReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMap.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMap.cs similarity index 92% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMap.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMap.cs index 0cd52338b9..05b54ace4a 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMap.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMap.cs @@ -4,9 +4,9 @@ using System; using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class IISRewriteMap + internal class IISRewriteMap { private readonly Dictionary _map = new Dictionary(); diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMapCollection.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMapCollection.cs similarity index 89% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMapCollection.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMapCollection.cs index 4f8a900623..b473a5295c 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISRewriteMapCollection.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/IISRewriteMapCollection.cs @@ -4,9 +4,9 @@ using System.Collections; using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class IISRewriteMapCollection : IEnumerable + internal class IISRewriteMapCollection : IEnumerable { private readonly Dictionary _rewriteMaps = new Dictionary(); diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISUrlRewriteRule.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/IISUrlRewriteRule.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISUrlRewriteRule.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/IISUrlRewriteRule.cs index d77f93d294..730477e06f 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/IISUrlRewriteRule.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/IISUrlRewriteRule.cs @@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class IISUrlRewriteRule : IRule + internal class IISUrlRewriteRule : IRule { public string Name { get; } public UrlMatch InitialMatch { get; } diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InputParser.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/InputParser.cs similarity index 98% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InputParser.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/InputParser.cs index a68ef08bd5..cb7672b5de 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InputParser.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/InputParser.cs @@ -4,11 +4,11 @@ using System; using System.Collections.Generic; using System.Globalization; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class InputParser + internal class InputParser { private const char Colon = ':'; private const char OpenBrace = '{'; diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InvalidUrlRewriteFormatException.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/InvalidUrlRewriteFormatException.cs similarity index 89% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InvalidUrlRewriteFormatException.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/InvalidUrlRewriteFormatException.cs index 8e2bac3937..f7c74be2ac 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/InvalidUrlRewriteFormatException.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/InvalidUrlRewriteFormatException.cs @@ -5,9 +5,9 @@ using System; using System.Xml; using System.Xml.Linq; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class InvalidUrlRewriteFormatException : FormatException + internal class InvalidUrlRewriteFormatException : FormatException { public int LineNumber { get; } public int LinePosition { get; } diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/LogicalGrouping.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/LogicalGrouping.cs similarity index 70% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/LogicalGrouping.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/LogicalGrouping.cs index 85dc616e89..49b653de19 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/LogicalGrouping.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/LogicalGrouping.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum LogicalGrouping + internal enum LogicalGrouping { MatchAll, MatchAny diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/MatchType.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/MatchType.cs similarity index 73% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/MatchType.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/MatchType.cs index 4f02dc48ce..fb5ae7c4ba 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/MatchType.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/MatchType.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum MatchType + internal enum MatchType { Pattern, IsFile, diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/PatternSyntax.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/PatternSyntax.cs similarity index 72% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/PatternSyntax.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/PatternSyntax.cs index f27d2c7256..0d19cf46cf 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/PatternSyntax.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/PatternSyntax.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum PatternSyntax + internal enum PatternSyntax { ECMAScript, Wildcard, diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RedirectType.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/RedirectType.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RedirectType.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/RedirectType.cs index 012cc77ded..8a02b72bc3 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RedirectType.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/RedirectType.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum RedirectType + internal enum RedirectType { Permanent = StatusCodes.Status301MovedPermanently, Found = StatusCodes.Status302Found, diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteMapParser.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/RewriteMapParser.cs similarity index 92% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteMapParser.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/RewriteMapParser.cs index 4e9b21d800..c15105ca55 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteMapParser.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/RewriteMapParser.cs @@ -5,9 +5,9 @@ using System; using System.Linq; using System.Xml.Linq; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public static class RewriteMapParser + internal static class RewriteMapParser { public static IISRewriteMapCollection Parse(XElement xmlRoot) { diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteTags.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/RewriteTags.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteTags.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/RewriteTags.cs index d6d482bdd4..10d555625e 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/RewriteTags.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/RewriteTags.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public static class RewriteTags + internal static class RewriteTags { public const string Action = "action"; public const string Add = "add"; diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ServerVariables.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/ServerVariables.cs similarity index 96% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ServerVariables.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/ServerVariables.cs index cc991ca664..68185b6e68 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/ServerVariables.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/ServerVariables.cs @@ -2,12 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public static class ServerVariables + internal static class ServerVariables { /// /// Returns the matching for the given diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchCondition.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchCondition.cs similarity index 84% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchCondition.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchCondition.cs index c8378c6b77..0dd92a0b84 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchCondition.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchCondition.cs @@ -3,11 +3,11 @@ using System; using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlMatches; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class UriMatchCondition : Condition + internal class UriMatchCondition : Condition { private TimeSpan _regexTimeout = TimeSpan.FromSeconds(1); diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchPart.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchPart.cs similarity index 69% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchPart.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchPart.cs index 25da940689..fe3407343d 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UriMatchPart.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/UriMatchPart.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public enum UriMatchPart + internal enum UriMatchPart { Full, Path diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteFileParser.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteFileParser.cs similarity index 98% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteFileParser.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteFileParser.cs index 6cb1d824fb..7597752744 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteFileParser.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteFileParser.cs @@ -7,12 +7,12 @@ using System.Globalization; using System.IO; using System.Linq; using System.Xml.Linq; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class UrlRewriteFileParser + internal class UrlRewriteFileParser { private InputParser _inputParser; diff --git a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteRuleBuilder.cs b/src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteRuleBuilder.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteRuleBuilder.cs rename to src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteRuleBuilder.cs index 69ed962154..1e12bb0501 100644 --- a/src/Middleware/Rewrite/src/Internal/IISUrlRewrite/UrlRewriteRuleBuilder.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewrite/UrlRewriteRuleBuilder.cs @@ -4,11 +4,11 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlMatches; -namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite +namespace Microsoft.AspNetCore.Rewrite.IISUrlRewrite { - public class UrlRewriteRuleBuilder + internal class UrlRewriteRuleBuilder { private readonly TimeSpan _regexTimeout = TimeSpan.FromSeconds(1); diff --git a/src/Middleware/Rewrite/src/IISUrlRewriteOptionsExtensions.cs b/src/Middleware/Rewrite/src/IISUrlRewriteOptionsExtensions.cs index 600a3c0656..50b32218ac 100644 --- a/src/Middleware/Rewrite/src/IISUrlRewriteOptionsExtensions.cs +++ b/src/Middleware/Rewrite/src/IISUrlRewriteOptionsExtensions.cs @@ -4,7 +4,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Microsoft.Extensions.FileProviders; namespace Microsoft.AspNetCore.Rewrite diff --git a/src/Middleware/Rewrite/src/Internal/MatchResults.cs b/src/Middleware/Rewrite/src/MatchResults.cs similarity index 87% rename from src/Middleware/Rewrite/src/Internal/MatchResults.cs rename to src/Middleware/Rewrite/src/MatchResults.cs index 13c505d8f0..9bb18cefa8 100644 --- a/src/Middleware/Rewrite/src/Internal/MatchResults.cs +++ b/src/Middleware/Rewrite/src/MatchResults.cs @@ -3,9 +3,9 @@ using System.Text.RegularExpressions; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class MatchResults + internal class MatchResults { public static readonly MatchResults EmptySuccess = new MatchResults { Success = true }; public static readonly MatchResults EmptyFailure = new MatchResults { Success = false }; diff --git a/src/Middleware/Rewrite/src/Internal/ParserContext.cs b/src/Middleware/Rewrite/src/ParserContext.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/ParserContext.cs rename to src/Middleware/Rewrite/src/ParserContext.cs index 50d0d3998a..624404ead0 100644 --- a/src/Middleware/Rewrite/src/Internal/ParserContext.cs +++ b/src/Middleware/Rewrite/src/ParserContext.cs @@ -1,12 +1,12 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { /// /// Represents a string iterator, with captures. /// - public class ParserContext + internal class ParserContext { public readonly string Template; public int Index { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/Pattern.cs b/src/Middleware/Rewrite/src/Pattern.cs similarity index 92% rename from src/Middleware/Rewrite/src/Internal/Pattern.cs rename to src/Middleware/Rewrite/src/Pattern.cs index fe33dfa628..8d5d9bd4ac 100644 --- a/src/Middleware/Rewrite/src/Internal/Pattern.cs +++ b/src/Middleware/Rewrite/src/Pattern.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class Pattern + internal class Pattern { public IList PatternSegments { get; } public Pattern(IList patternSegments) diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegment.cs b/src/Middleware/Rewrite/src/PatternSegment.cs similarity index 79% rename from src/Middleware/Rewrite/src/Internal/PatternSegment.cs rename to src/Middleware/Rewrite/src/PatternSegment.cs index ef2b342065..9a06354513 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public abstract class PatternSegment + internal abstract class PatternSegment { public abstract string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences); } diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/ConditionMatchSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/ConditionMatchSegment.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/ConditionMatchSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/ConditionMatchSegment.cs index 6c131e2c1c..58e2c3be51 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/ConditionMatchSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/ConditionMatchSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class ConditionMatchSegment : PatternSegment + internal class ConditionMatchSegment : PatternSegment { private readonly int _index; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/DateTimeSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/DateTimeSegment.cs similarity index 96% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/DateTimeSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/DateTimeSegment.cs index 588a19de27..7205c120e1 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/DateTimeSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/DateTimeSegment.cs @@ -4,9 +4,9 @@ using System; using System.Globalization; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class DateTimeSegment : PatternSegment + internal class DateTimeSegment : PatternSegment { private readonly DateTimePortion _portion; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/HeaderSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/HeaderSegment.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/HeaderSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/HeaderSegment.cs index 83bb5918e9..8e279e482a 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/HeaderSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/HeaderSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class HeaderSegment : PatternSegment + internal class HeaderSegment : PatternSegment { private readonly string _header; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/IISServerVariableSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/IISServerVariableSegment.cs similarity index 93% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/IISServerVariableSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/IISServerVariableSegment.cs index 8bc3f96cf8..a4ac6fee58 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/IISServerVariableSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/IISServerVariableSegment.cs @@ -4,7 +4,7 @@ using System; using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { internal class IISServerVariableSegment : PatternSegment { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsModSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/IsHttpsModSegment.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsModSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/IsHttpsModSegment.cs index ba42a8ce03..eee896614c 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsModSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/IsHttpsModSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class IsHttpsModSegment : PatternSegment + internal class IsHttpsModSegment : PatternSegment { // Note: Mod rewrite pattern matches on lower case "on" and "off" // while IIS looks for capitalized "ON" and "OFF" diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsUrlSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/IsHttpsUrlSegment.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsUrlSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/IsHttpsUrlSegment.cs index 106bc089c7..dda5f5ca26 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsHttpsUrlSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/IsHttpsUrlSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class IsHttpsUrlSegment : PatternSegment + internal class IsHttpsUrlSegment : PatternSegment { // Note: Mod rewrite pattern matches on lower case "on" and "off" // while IIS looks for capitalized "ON" and "OFF" diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsIPV6Segment.cs b/src/Middleware/Rewrite/src/PatternSegments/IsIPV6Segment.cs similarity index 85% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/IsIPV6Segment.cs rename to src/Middleware/Rewrite/src/PatternSegments/IsIPV6Segment.cs index 858dd45c85..b788e2a272 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/IsIPV6Segment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/IsIPV6Segment.cs @@ -3,10 +3,9 @@ using System.Net.Sockets; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - - public class IsIPV6Segment : PatternSegment + internal class IsIPV6Segment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/LiteralSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/LiteralSegment.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/LiteralSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/LiteralSegment.cs index c89818c09b..b81ba13052 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/LiteralSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/LiteralSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class LiteralSegment : PatternSegment + internal class LiteralSegment : PatternSegment { private readonly string _literal; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/LocalAddressSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/LocalAddressSegment.cs similarity index 78% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/LocalAddressSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/LocalAddressSegment.cs index 5b6e0a2c66..f3242b6f67 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/LocalAddressSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/LocalAddressSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class LocalAddressSegment : PatternSegment + internal class LocalAddressSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/LocalPortSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/LocalPortSegment.cs similarity index 81% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/LocalPortSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/LocalPortSegment.cs index dc39080723..aab21a7b61 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/LocalPortSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/LocalPortSegment.cs @@ -3,9 +3,9 @@ using System.Globalization; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class LocalPortSegment : PatternSegment + internal class LocalPortSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/QueryStringSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/QueryStringSegment.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/QueryStringSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/QueryStringSegment.cs index c2b2c56c39..2b2521ad35 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/QueryStringSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/QueryStringSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class QueryStringSegment : PatternSegment + internal class QueryStringSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackRefernces, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RemoteAddressSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RemoteAddressSegment.cs similarity index 78% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RemoteAddressSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RemoteAddressSegment.cs index acdb9f3a41..ae28e418f2 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RemoteAddressSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RemoteAddressSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RemoteAddressSegment : PatternSegment + internal class RemoteAddressSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RemotePortSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RemotePortSegment.cs similarity index 80% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RemotePortSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RemotePortSegment.cs index 720e5493ca..236a402144 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RemotePortSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RemotePortSegment.cs @@ -3,9 +3,9 @@ using System.Globalization; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RemotePortSegment : PatternSegment + internal class RemotePortSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RequestFilenameSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RequestFilenameSegment.cs similarity index 77% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RequestFilenameSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RequestFilenameSegment.cs index fb3615b9c0..06d2f985b8 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RequestFilenameSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RequestFilenameSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RequestFileNameSegment : PatternSegment + internal class RequestFileNameSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RequestMethodSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RequestMethodSegment.cs similarity index 77% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RequestMethodSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RequestMethodSegment.cs index ffd106380c..d97ad872c1 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RequestMethodSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RequestMethodSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RequestMethodSegment : PatternSegment + internal class RequestMethodSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RewriteMapSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RewriteMapSegment.cs similarity index 81% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RewriteMapSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RewriteMapSegment.cs index 3dd50c9fec..ec13b10ac3 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RewriteMapSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RewriteMapSegment.cs @@ -1,11 +1,11 @@ // 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.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RewriteMapSegment : PatternSegment + internal class RewriteMapSegment : PatternSegment { private readonly IISRewriteMap _rewriteMap; private readonly Pattern _pattern; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/RuleMatchSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/RuleMatchSegment.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/RuleMatchSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/RuleMatchSegment.cs index cdd4b38e24..1cdbdc68af 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/RuleMatchSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/RuleMatchSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class RuleMatchSegment : PatternSegment + internal class RuleMatchSegment : PatternSegment { private readonly int _index; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/SchemeSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/SchemeSegment.cs similarity index 78% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/SchemeSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/SchemeSegment.cs index bea7073308..1f215434a1 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/SchemeSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/SchemeSegment.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class SchemeSegment : PatternSegment + internal class SchemeSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/ServerProtocolSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/ServerProtocolSegment.cs similarity index 80% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/ServerProtocolSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/ServerProtocolSegment.cs index bf7f355194..38ea6c7446 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/ServerProtocolSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/ServerProtocolSegment.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Http.Features; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class ServerProtocolSegment : PatternSegment + internal class ServerProtocolSegment : PatternSegment { public override string Evaluate(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/ToLowerSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/ToLowerSegment.cs similarity index 89% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/ToLowerSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/ToLowerSegment.cs index dec2029658..b7863221cc 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/ToLowerSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/ToLowerSegment.cs @@ -3,9 +3,9 @@ using System.Text; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class ToLowerSegment : PatternSegment + internal class ToLowerSegment : PatternSegment { private readonly Pattern _pattern; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/UrlEncodeSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/UrlEncodeSegment.cs similarity index 90% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/UrlEncodeSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/UrlEncodeSegment.cs index dc99dd4d51..c3930165a0 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/UrlEncodeSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/UrlEncodeSegment.cs @@ -4,9 +4,9 @@ using System.Text; using System.Text.Encodings.Web; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class UrlEncodeSegment : PatternSegment + internal class UrlEncodeSegment : PatternSegment { private readonly Pattern _pattern; diff --git a/src/Middleware/Rewrite/src/Internal/PatternSegments/UrlSegment.cs b/src/Middleware/Rewrite/src/PatternSegments/UrlSegment.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/PatternSegments/UrlSegment.cs rename to src/Middleware/Rewrite/src/PatternSegments/UrlSegment.cs index 431d5cd5fb..74c16b6816 100644 --- a/src/Middleware/Rewrite/src/Internal/PatternSegments/UrlSegment.cs +++ b/src/Middleware/Rewrite/src/PatternSegments/UrlSegment.cs @@ -2,11 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http.Extensions; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; -namespace Microsoft.AspNetCore.Rewrite.Internal.PatternSegments +namespace Microsoft.AspNetCore.Rewrite.PatternSegments { - public class UrlSegment : PatternSegment + internal class UrlSegment : PatternSegment { private readonly UriMatchPart _uriMatchPart; diff --git a/src/Middleware/Rewrite/src/Internal/RedirectRule.cs b/src/Middleware/Rewrite/src/RedirectRule.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/RedirectRule.cs rename to src/Middleware/Rewrite/src/RedirectRule.cs index cf7ae0767c..3685fedad3 100644 --- a/src/Middleware/Rewrite/src/Internal/RedirectRule.cs +++ b/src/Middleware/Rewrite/src/RedirectRule.cs @@ -7,9 +7,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class RedirectRule : IRule + internal class RedirectRule : IRule { private readonly TimeSpan _regexTimeout = TimeSpan.FromSeconds(1); public Regex InitialMatch { get; } diff --git a/src/Middleware/Rewrite/src/Internal/RedirectToHttpsRule.cs b/src/Middleware/Rewrite/src/RedirectToHttpsRule.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/RedirectToHttpsRule.cs rename to src/Middleware/Rewrite/src/RedirectToHttpsRule.cs index ae481c8824..4231a5bd94 100644 --- a/src/Middleware/Rewrite/src/Internal/RedirectToHttpsRule.cs +++ b/src/Middleware/Rewrite/src/RedirectToHttpsRule.cs @@ -6,9 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Rewrite.Logging; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class RedirectToHttpsRule : IRule + internal class RedirectToHttpsRule : IRule { public int? SSLPort { get; set; } public int StatusCode { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/RedirectToWwwRule.cs b/src/Middleware/Rewrite/src/RedirectToWwwRule.cs similarity index 96% rename from src/Middleware/Rewrite/src/Internal/RedirectToWwwRule.cs rename to src/Middleware/Rewrite/src/RedirectToWwwRule.cs index d368d61446..fcf9735aef 100644 --- a/src/Middleware/Rewrite/src/Internal/RedirectToWwwRule.cs +++ b/src/Middleware/Rewrite/src/RedirectToWwwRule.cs @@ -7,9 +7,9 @@ using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Rewrite.Logging; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class RedirectToWwwRule : IRule + internal class RedirectToWwwRule : IRule { public readonly int _statusCode; public readonly string[] _domains; diff --git a/src/Middleware/Rewrite/src/RewriteOptionsExtensions.cs b/src/Middleware/Rewrite/src/RewriteOptionsExtensions.cs index d1b69dbd34..88b6d783b4 100644 --- a/src/Middleware/Rewrite/src/RewriteOptionsExtensions.cs +++ b/src/Middleware/Rewrite/src/RewriteOptionsExtensions.cs @@ -3,7 +3,6 @@ using System; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal; namespace Microsoft.AspNetCore.Rewrite { diff --git a/src/Middleware/Rewrite/src/Internal/RewriteRule.cs b/src/Middleware/Rewrite/src/RewriteRule.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/RewriteRule.cs rename to src/Middleware/Rewrite/src/RewriteRule.cs index 79416b548f..85835237eb 100644 --- a/src/Middleware/Rewrite/src/Internal/RewriteRule.cs +++ b/src/Middleware/Rewrite/src/RewriteRule.cs @@ -7,9 +7,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public class RewriteRule : IRule + internal class RewriteRule : IRule { private readonly TimeSpan _regexTimeout = TimeSpan.FromSeconds(1); public Regex InitialMatch { get; } diff --git a/src/Middleware/Rewrite/src/Internal/UrlAction.cs b/src/Middleware/Rewrite/src/UrlAction.cs similarity index 82% rename from src/Middleware/Rewrite/src/Internal/UrlAction.cs rename to src/Middleware/Rewrite/src/UrlAction.cs index b01e0c1bd8..67cfe24eea 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlAction.cs +++ b/src/Middleware/Rewrite/src/UrlAction.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public abstract class UrlAction + internal abstract class UrlAction { protected Pattern Url { get; set; } public abstract void ApplyAction(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences); diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/AbortAction.cs b/src/Middleware/Rewrite/src/UrlActions/AbortAction.cs similarity index 86% rename from src/Middleware/Rewrite/src/Internal/UrlActions/AbortAction.cs rename to src/Middleware/Rewrite/src/UrlActions/AbortAction.cs index d5c3182fb1..850b2fa566 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/AbortAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/AbortAction.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class AbortAction : UrlAction + internal class AbortAction : UrlAction { public override void ApplyAction(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/ChangeCookieAction.cs b/src/Middleware/Rewrite/src/UrlActions/ChangeCookieAction.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/UrlActions/ChangeCookieAction.cs rename to src/Middleware/Rewrite/src/UrlActions/ChangeCookieAction.cs index c758111ca1..b3b6452ac4 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/ChangeCookieAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/ChangeCookieAction.cs @@ -4,9 +4,9 @@ using System; using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class ChangeCookieAction : UrlAction + internal class ChangeCookieAction : UrlAction { private readonly Func _timeSource; private CookieOptions _cachedOptions; diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/CustomResponseAction.cs b/src/Middleware/Rewrite/src/UrlActions/CustomResponseAction.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/UrlActions/CustomResponseAction.cs rename to src/Middleware/Rewrite/src/UrlActions/CustomResponseAction.cs index 5fb4253b24..1b3fb4c2fb 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/CustomResponseAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/CustomResponseAction.cs @@ -6,9 +6,9 @@ using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Rewrite.Logging; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class CustomResponseAction : UrlAction + internal class CustomResponseAction : UrlAction { public int StatusCode { get; } public string StatusReason { get; set; } diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/ForbiddenAction.cs b/src/Middleware/Rewrite/src/UrlActions/ForbiddenAction.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/UrlActions/ForbiddenAction.cs rename to src/Middleware/Rewrite/src/UrlActions/ForbiddenAction.cs index 3a1c14e75f..cfa007b3b8 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/ForbiddenAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/ForbiddenAction.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class ForbiddenAction : UrlAction + internal class ForbiddenAction : UrlAction { public override void ApplyAction(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/GoneAction.cs b/src/Middleware/Rewrite/src/UrlActions/GoneAction.cs similarity index 84% rename from src/Middleware/Rewrite/src/Internal/UrlActions/GoneAction.cs rename to src/Middleware/Rewrite/src/UrlActions/GoneAction.cs index f85cd22e3b..553d5ca923 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/GoneAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/GoneAction.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class GoneAction : UrlAction + internal class GoneAction : UrlAction { public override void ApplyAction(RewriteContext context, BackReferenceCollection ruleBackReferences, BackReferenceCollection conditionBackReferences) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/NoneAction.cs b/src/Middleware/Rewrite/src/UrlActions/NoneAction.cs similarity index 85% rename from src/Middleware/Rewrite/src/Internal/UrlActions/NoneAction.cs rename to src/Middleware/Rewrite/src/UrlActions/NoneAction.cs index 4ba171bb5e..691f453412 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/NoneAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/NoneAction.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class NoneAction : UrlAction + internal class NoneAction : UrlAction { public RuleResult Result { get; } diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/RedirectAction.cs b/src/Middleware/Rewrite/src/UrlActions/RedirectAction.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/UrlActions/RedirectAction.cs rename to src/Middleware/Rewrite/src/UrlActions/RedirectAction.cs index f3ac9d3196..4c271cae4a 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/RedirectAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/RedirectAction.cs @@ -5,9 +5,9 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class RedirectAction : UrlAction + internal class RedirectAction : UrlAction { public int StatusCode { get; } public bool QueryStringAppend { get; } diff --git a/src/Middleware/Rewrite/src/Internal/UrlActions/RewriteAction.cs b/src/Middleware/Rewrite/src/UrlActions/RewriteAction.cs similarity index 97% rename from src/Middleware/Rewrite/src/Internal/UrlActions/RewriteAction.cs rename to src/Middleware/Rewrite/src/UrlActions/RewriteAction.cs index 8f9c5818d3..4f1e147a32 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlActions/RewriteAction.cs +++ b/src/Middleware/Rewrite/src/UrlActions/RewriteAction.cs @@ -5,9 +5,9 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlActions +namespace Microsoft.AspNetCore.Rewrite.UrlActions { - public class RewriteAction : UrlAction + internal class RewriteAction : UrlAction { public RuleResult Result { get; } public bool QueryStringAppend { get; } diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatch.cs b/src/Middleware/Rewrite/src/UrlMatch.cs similarity index 79% rename from src/Middleware/Rewrite/src/Internal/UrlMatch.cs rename to src/Middleware/Rewrite/src/UrlMatch.cs index 9d78d63d67..14e0b9f2f3 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal +namespace Microsoft.AspNetCore.Rewrite { - public abstract class UrlMatch + internal abstract class UrlMatch { protected bool Negate { get; set; } public abstract MatchResults Evaluate(string input, RewriteContext context); diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/ExactMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/ExactMatch.cs similarity index 90% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/ExactMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/ExactMatch.cs index 23db120580..76e767a71d 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/ExactMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/ExactMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class ExactMatch : UrlMatch + internal class ExactMatch : UrlMatch { private readonly bool _ignoreCase; private readonly string _stringMatch; diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/FileSizeMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/FileSizeMatch.cs similarity index 84% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/FileSizeMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/FileSizeMatch.cs index e798b0191c..8dd07f6fcd 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/FileSizeMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/FileSizeMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class FileSizeMatch : UrlMatch + internal class FileSizeMatch : UrlMatch { public FileSizeMatch(bool negate) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/IntegerMatch.cs similarity index 95% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/IntegerMatch.cs index 73b814731f..e6dd7996c3 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/IntegerMatch.cs @@ -5,9 +5,9 @@ using System; using System.Globalization; using Microsoft.AspNetCore.Rewrite; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class IntegerMatch : UrlMatch + internal class IntegerMatch : UrlMatch { private readonly int _value; private readonly IntegerOperationType _operation; diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerOperation.cs b/src/Middleware/Rewrite/src/UrlMatches/IntegerOperation.cs similarity index 75% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerOperation.cs rename to src/Middleware/Rewrite/src/UrlMatches/IntegerOperation.cs index fce53e3844..64253ff7b8 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/IntegerOperation.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/IntegerOperation.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public enum IntegerOperationType + internal enum IntegerOperationType { Equal, Greater, diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/IsDirectoryMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/IsDirectoryMatch.cs similarity index 83% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/IsDirectoryMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/IsDirectoryMatch.cs index b4361c5d31..f8745855b4 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/IsDirectoryMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/IsDirectoryMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class IsDirectoryMatch : UrlMatch + internal class IsDirectoryMatch : UrlMatch { public IsDirectoryMatch(bool negate) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/IsFileMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/IsFileMatch.cs similarity index 84% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/IsFileMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/IsFileMatch.cs index e4d4816133..e951d6df4a 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/IsFileMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/IsFileMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class IsFileMatch : UrlMatch + internal class IsFileMatch : UrlMatch { public IsFileMatch(bool negate) { diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/RegexMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/RegexMatch.cs similarity index 87% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/RegexMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/RegexMatch.cs index 131eea8f9d..e0d0319a52 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/RegexMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/RegexMatch.cs @@ -3,9 +3,9 @@ using System.Text.RegularExpressions; -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class RegexMatch : UrlMatch + internal class RegexMatch : UrlMatch { private readonly Regex _match; diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/StringMatch.cs b/src/Middleware/Rewrite/src/UrlMatches/StringMatch.cs similarity index 94% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/StringMatch.cs rename to src/Middleware/Rewrite/src/UrlMatches/StringMatch.cs index e991144f2d..38e0fdccd2 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/StringMatch.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/StringMatch.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public class StringMatch : UrlMatch + internal class StringMatch : UrlMatch { private readonly string _value; private readonly StringOperationType _operation; diff --git a/src/Middleware/Rewrite/src/Internal/UrlMatches/StringOperation.cs b/src/Middleware/Rewrite/src/UrlMatches/StringOperation.cs similarity index 74% rename from src/Middleware/Rewrite/src/Internal/UrlMatches/StringOperation.cs rename to src/Middleware/Rewrite/src/UrlMatches/StringOperation.cs index 15ff45d5f0..b45a56e86e 100644 --- a/src/Middleware/Rewrite/src/Internal/UrlMatches/StringOperation.cs +++ b/src/Middleware/Rewrite/src/UrlMatches/StringOperation.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Rewrite.Internal.UrlMatches +namespace Microsoft.AspNetCore.Rewrite.UrlMatches { - public enum StringOperationType + internal enum StringOperationType { Equal, Greater, diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/ConditionPatternParserTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/ConditionPatternParserTest.cs index d9dc2a5cf8..2bd799cb57 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/ConditionPatternParserTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/ConditionPatternParserTest.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite @@ -10,16 +10,16 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite public class ConditionPatternParserTest { [Theory] - [InlineData(">hey", OperationType.Greater, "hey", ConditionType.StringComp)] - [InlineData("=hey", OperationType.GreaterEqual, "hey", ConditionType.StringComp)] - [InlineData("<=hey", OperationType.LessEqual, "hey", ConditionType.StringComp)] - [InlineData("=hey", OperationType.Equal, "hey", ConditionType.StringComp)] - public void ConditionPatternParser_CheckStringComp(string condition, OperationType operation, string variable, ConditionType conditionType) + [InlineData(">hey", (int)OperationType.Greater, "hey", (int)ConditionType.StringComp)] + [InlineData("=hey", (int)OperationType.GreaterEqual, "hey", (int)ConditionType.StringComp)] + [InlineData("<=hey", (int)OperationType.LessEqual, "hey", (int)ConditionType.StringComp)] + [InlineData("=hey", (int)OperationType.Equal, "hey", (int)ConditionType.StringComp)] + public void ConditionPatternParser_CheckStringComp(string condition, int operation, string variable, int conditionType) { var results = new ConditionPatternParser().ParseActionCondition(condition); - var expected = new ParsedModRewriteInput { OperationType = operation, ConditionType = conditionType, Operand = variable, Invert = false }; + var expected = new ParsedModRewriteInput { OperationType = (OperationType)operation, ConditionType = (ConditionType)conditionType, Operand = variable, Invert = false }; Assert.True(CompareConditions(expected, results)); } @@ -34,53 +34,53 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite } [Theory] - [InlineData("-d", OperationType.Directory, ConditionType.PropertyTest)] - [InlineData("-f", OperationType.RegularFile, ConditionType.PropertyTest)] - [InlineData("-F", OperationType.ExistingFile, ConditionType.PropertyTest)] - [InlineData("-h", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("-L", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("-l", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("-s", OperationType.Size, ConditionType.PropertyTest)] - [InlineData("-U", OperationType.ExistingUrl, ConditionType.PropertyTest)] - [InlineData("-x", OperationType.Executable, ConditionType.PropertyTest)] - public void ConditionPatternParser_CheckFileOperations(string condition, OperationType operation, ConditionType cond) + [InlineData("-d", (int)OperationType.Directory, (int)ConditionType.PropertyTest)] + [InlineData("-f", (int)OperationType.RegularFile, (int)ConditionType.PropertyTest)] + [InlineData("-F", (int)OperationType.ExistingFile, (int)ConditionType.PropertyTest)] + [InlineData("-h", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("-L", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("-l", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("-s", (int)OperationType.Size, (int)ConditionType.PropertyTest)] + [InlineData("-U", (int)OperationType.ExistingUrl, (int)ConditionType.PropertyTest)] + [InlineData("-x", (int)OperationType.Executable, (int)ConditionType.PropertyTest)] + public void ConditionPatternParser_CheckFileOperations(string condition, int operation, int cond) { var results = new ConditionPatternParser().ParseActionCondition(condition); - var expected = new ParsedModRewriteInput { ConditionType = cond, OperationType = operation, Invert = false }; + var expected = new ParsedModRewriteInput { ConditionType = (ConditionType)cond, OperationType = (OperationType)operation, Invert = false }; Assert.True(CompareConditions(expected, results)); } [Theory] - [InlineData("!-d", OperationType.Directory, ConditionType.PropertyTest)] - [InlineData("!-f", OperationType.RegularFile, ConditionType.PropertyTest)] - [InlineData("!-F", OperationType.ExistingFile, ConditionType.PropertyTest)] - [InlineData("!-h", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("!-L", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("!-l", OperationType.SymbolicLink, ConditionType.PropertyTest)] - [InlineData("!-s", OperationType.Size, ConditionType.PropertyTest)] - [InlineData("!-U", OperationType.ExistingUrl, ConditionType.PropertyTest)] - [InlineData("!-x", OperationType.Executable, ConditionType.PropertyTest)] - public void ConditionPatternParser_CheckFileOperationsInverted(string condition, OperationType operation, ConditionType cond) + [InlineData("!-d", (int)OperationType.Directory, (int)ConditionType.PropertyTest)] + [InlineData("!-f", (int)OperationType.RegularFile, (int)ConditionType.PropertyTest)] + [InlineData("!-F", (int)OperationType.ExistingFile, (int)ConditionType.PropertyTest)] + [InlineData("!-h", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("!-L", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("!-l", (int)OperationType.SymbolicLink, (int)ConditionType.PropertyTest)] + [InlineData("!-s", (int)OperationType.Size, (int)ConditionType.PropertyTest)] + [InlineData("!-U", (int)OperationType.ExistingUrl, (int)ConditionType.PropertyTest)] + [InlineData("!-x", (int)OperationType.Executable, (int)ConditionType.PropertyTest)] + public void ConditionPatternParser_CheckFileOperationsInverted(string condition, int operation, int cond) { var results = new ConditionPatternParser().ParseActionCondition(condition); - var expected = new ParsedModRewriteInput { ConditionType = cond, OperationType = operation, Invert = true }; + var expected = new ParsedModRewriteInput { ConditionType = (ConditionType)cond, OperationType = (OperationType)operation, Invert = true }; Assert.True(CompareConditions(expected, results)); } [Theory] - [InlineData("-gt1", OperationType.Greater, "1", ConditionType.IntComp)] - [InlineData("-lt1", OperationType.Less, "1", ConditionType.IntComp)] - [InlineData("-ge1", OperationType.GreaterEqual, "1", ConditionType.IntComp)] - [InlineData("-le1", OperationType.LessEqual, "1", ConditionType.IntComp)] - [InlineData("-eq1", OperationType.Equal, "1", ConditionType.IntComp)] - [InlineData("-ne1", OperationType.NotEqual, "1", ConditionType.IntComp)] - public void ConditionPatternParser_CheckIntComp(string condition, OperationType operation, string variable, ConditionType cond) + [InlineData("-gt1", (int)OperationType.Greater, "1", (int)ConditionType.IntComp)] + [InlineData("-lt1", (int)OperationType.Less, "1", (int)ConditionType.IntComp)] + [InlineData("-ge1", (int)OperationType.GreaterEqual, "1", (int)ConditionType.IntComp)] + [InlineData("-le1", (int)OperationType.LessEqual, "1", (int)ConditionType.IntComp)] + [InlineData("-eq1", (int)OperationType.Equal, "1", (int)ConditionType.IntComp)] + [InlineData("-ne1", (int)OperationType.NotEqual, "1", (int)ConditionType.IntComp)] + public void ConditionPatternParser_CheckIntComp(string condition, int operation, string variable, int cond) { var results = new ConditionPatternParser().ParseActionCondition(condition); - var expected = new ParsedModRewriteInput { ConditionType = cond, OperationType = operation, Invert = false, Operand = variable }; + var expected = new ParsedModRewriteInput { ConditionType = (ConditionType)cond, OperationType = (OperationType)operation, Invert = false, Operand = variable }; Assert.True(CompareConditions(expected, results)); } diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/CookieActionFactoryTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/CookieActionFactoryTest.cs index d992eb7937..dd6501bf97 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/CookieActionFactoryTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/CookieActionFactoryTest.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Test diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/FlagParserTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/FlagParserTest.cs index bfb4c6420f..bad4b598b9 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/FlagParserTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/FlagParserTest.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/FormatExceptionTests.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/FormatExceptionTests.cs index 20db752b1f..44066bcfd1 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/FormatExceptionTests.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/FormatExceptionTests.cs @@ -3,7 +3,7 @@ using System; using System.IO; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/RewriteTokenizerTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/RewriteTokenizerTest.cs index 04a7071d7b..0d192e2fe5 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/RewriteTokenizerTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/RewriteTokenizerTest.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/RuleBuilderTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/RuleBuilderTest.cs index ec0b46803f..fe63d9afe6 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/RuleBuilderTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/RuleBuilderTest.cs @@ -4,9 +4,8 @@ using System; using System.Collections.Generic; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.UrlActions; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/RuleRegexParserTest.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/RuleRegexParserTest.cs index 20f54abba5..9af8163bf2 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/RuleRegexParserTest.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/RuleRegexParserTest.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite diff --git a/src/Middleware/Rewrite/test/ApacheModRewrite/TestStringParserTests.cs b/src/Middleware/Rewrite/test/ApacheModRewrite/TestStringParserTests.cs index eafb814ab1..3968c9e403 100644 --- a/src/Middleware/Rewrite/test/ApacheModRewrite/TestStringParserTests.cs +++ b/src/Middleware/Rewrite/test/ApacheModRewrite/TestStringParserTests.cs @@ -3,9 +3,8 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.ApacheModRewrite; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/FileParserTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/FileParserTests.cs index f6ad788aca..1949e773c8 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/FileParserTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/FileParserTests.cs @@ -4,10 +4,9 @@ using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/FormatExceptionHandlingTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/FormatExceptionHandlingTests.cs index 20ad022d5a..17cd5900d5 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/FormatExceptionHandlingTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/FormatExceptionHandlingTests.cs @@ -3,7 +3,7 @@ using System; using System.IO; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/InputParserTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/InputParserTests.cs index 0439bc4fa0..a737da083f 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/InputParserTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/InputParserTests.cs @@ -5,9 +5,8 @@ using System; using System.Linq; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Microsoft.Extensions.Logging.Abstractions; using Xunit; diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/InvalidUrlRewriteFormatExceptionHandlingTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/InvalidUrlRewriteFormatExceptionHandlingTests.cs index 4f6e77d01b..3784e692c9 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/InvalidUrlRewriteFormatExceptionHandlingTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/InvalidUrlRewriteFormatExceptionHandlingTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/MiddleWareTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/MiddleWareTests.cs index ce146b1df1..35df2b5c56 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/MiddleWareTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/MiddleWareTests.cs @@ -11,10 +11,9 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; using Microsoft.AspNetCore.TestHost; using Microsoft.Net.Http.Headers; using Xunit; @@ -553,9 +552,9 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite } [Theory] - [InlineData(@"^http://localhost(/.*)", "http://localhost/foo/bar", UriMatchPart.Path)] - [InlineData(@"^http://localhost(/.*)", "http://www.test.com/foo/bar", UriMatchPart.Full)] - public async Task Invoke_GlobalRuleConditionMatchesAgainstFullUri_CodedRule(string conditionInputPattern, string expectedResult, UriMatchPart uriMatchPart) + [InlineData(@"^http://localhost(/.*)", "http://localhost/foo/bar", (int)UriMatchPart.Path)] + [InlineData(@"^http://localhost(/.*)", "http://www.test.com/foo/bar", (int)UriMatchPart.Full)] + public async Task Invoke_GlobalRuleConditionMatchesAgainstFullUri_CodedRule(string conditionInputPattern, string expectedResult, int uriMatchPart) { // arrange var inputParser = new InputParser(); @@ -571,7 +570,7 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite inputParser, "{REQUEST_URI}", conditionInputPattern, - uriMatchPart, + (UriMatchPart)uriMatchPart, ignoreCase: true, negate: false); ruleBuilder.ConfigureConditionBehavior(LogicalGrouping.MatchAll, trackAllCaptures: true); @@ -579,7 +578,7 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite var action = new RewriteAction( RuleResult.SkipRemainingRules, - inputParser.ParseInputString(@"http://www.test.com{C:1}", uriMatchPart), + inputParser.ParseInputString(@"http://www.test.com{C:1}", (UriMatchPart)uriMatchPart), queryStringAppend: false); ruleBuilder.AddUrlAction(action); diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/RewriteMapParserTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/RewriteMapParserTests.cs index a917e675f7..f100eea479 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/RewriteMapParserTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/RewriteMapParserTests.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Xml.Linq; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.IISUrlRewrite diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/ServerVariableTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/ServerVariableTests.cs index 274ef848e5..d4aedd866c 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/ServerVariableTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/ServerVariableTests.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Microsoft.Net.Http.Headers; using Xunit; @@ -15,52 +15,52 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.IISUrlRewrite public class ServerVariableTests { [Theory] - [InlineData("CONTENT_LENGTH", "10", UriMatchPart.Path)] - [InlineData("CONTENT_TYPE", "json", UriMatchPart.Path)] - [InlineData("HTTP_ACCEPT", "accept", UriMatchPart.Path)] - [InlineData("HTTP_COOKIE", "cookie", UriMatchPart.Path)] - [InlineData("HTTP_HOST", "example.com", UriMatchPart.Path)] - [InlineData("HTTP_REFERER", "referer", UriMatchPart.Path)] - [InlineData("HTTP_USER_AGENT", "useragent", UriMatchPart.Path)] - [InlineData("HTTP_CONNECTION", "connection", UriMatchPart.Path)] - [InlineData("HTTP_URL", "/foo", UriMatchPart.Path)] - [InlineData("HTTP_URL", "http://example.com/foo?bar=1", UriMatchPart.Full)] - [InlineData("QUERY_STRING", "bar=1", UriMatchPart.Path)] - [InlineData("REQUEST_FILENAME", "/foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "/foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "http://example.com/foo?bar=1", UriMatchPart.Full)] - [InlineData("REQUEST_METHOD", "GET", UriMatchPart.Full)] - public void CheckServerVariableParsingAndApplication(string variable, string expected, UriMatchPart uriMatchPart) + [InlineData("CONTENT_LENGTH", "10", (int)UriMatchPart.Path)] + [InlineData("CONTENT_TYPE", "json", (int)UriMatchPart.Path)] + [InlineData("HTTP_ACCEPT", "accept", (int)UriMatchPart.Path)] + [InlineData("HTTP_COOKIE", "cookie", (int)UriMatchPart.Path)] + [InlineData("HTTP_HOST", "example.com", (int)UriMatchPart.Path)] + [InlineData("HTTP_REFERER", "referer", (int)UriMatchPart.Path)] + [InlineData("HTTP_USER_AGENT", "useragent", (int)UriMatchPart.Path)] + [InlineData("HTTP_CONNECTION", "connection", (int)UriMatchPart.Path)] + [InlineData("HTTP_URL", "/foo", (int)UriMatchPart.Path)] + [InlineData("HTTP_URL", "http://example.com/foo?bar=1", (int)UriMatchPart.Full)] + [InlineData("QUERY_STRING", "bar=1", (int)UriMatchPart.Path)] + [InlineData("REQUEST_FILENAME", "/foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "/foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "http://example.com/foo?bar=1", (int)UriMatchPart.Full)] + [InlineData("REQUEST_METHOD", "GET", (int)UriMatchPart.Full)] + public void CheckServerVariableParsingAndApplication(string variable, string expected, int uriMatchPart) { // Arrange and Act var testParserContext = new ParserContext("test"); - var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, uriMatchPart, true); + var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, (UriMatchPart)uriMatchPart, true); var lookup = serverVar.Evaluate(CreateTestRewriteContext(), CreateTestRuleMatch().BackReferences, CreateTestCondMatch().BackReferences); // Assert Assert.Equal(expected, lookup); } [Theory] - [InlineData("CONTENT_LENGTH", "20", UriMatchPart.Path)] - [InlineData("CONTENT_TYPE", "text/xml", UriMatchPart.Path)] - [InlineData("HTTP_ACCEPT", "other-accept", UriMatchPart.Path)] - [InlineData("HTTP_COOKIE", "other-cookie", UriMatchPart.Path)] - [InlineData("HTTP_HOST", "otherexample.com", UriMatchPart.Path)] - [InlineData("HTTP_REFERER", "other-referer", UriMatchPart.Path)] - [InlineData("HTTP_USER_AGENT", "other-useragent", UriMatchPart.Path)] - [InlineData("HTTP_CONNECTION", "other-connection", UriMatchPart.Path)] - [InlineData("HTTP_URL", "http://otherexample.com/other-foo?bar=2", UriMatchPart.Full)] - [InlineData("HTTP_URL", "http://otherexample.com/other-foo?bar=2", UriMatchPart.Path)] - [InlineData("QUERY_STRING", "bar=2", UriMatchPart.Path)] - [InlineData("REQUEST_FILENAME", "/other-foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "/other-foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "/other-foo", UriMatchPart.Full)] - [InlineData("REQUEST_METHOD", "POST", UriMatchPart.Full)] - public void CheckServerVariableFeatureHasPrecedenceWhenEnabled(string variable, string expected, UriMatchPart uriMatchPart) + [InlineData("CONTENT_LENGTH", "20", (int)UriMatchPart.Path)] + [InlineData("CONTENT_TYPE", "text/xml", (int)UriMatchPart.Path)] + [InlineData("HTTP_ACCEPT", "other-accept", (int)UriMatchPart.Path)] + [InlineData("HTTP_COOKIE", "other-cookie", (int)UriMatchPart.Path)] + [InlineData("HTTP_HOST", "otherexample.com", (int)UriMatchPart.Path)] + [InlineData("HTTP_REFERER", "other-referer", (int)UriMatchPart.Path)] + [InlineData("HTTP_USER_AGENT", "other-useragent", (int)UriMatchPart.Path)] + [InlineData("HTTP_CONNECTION", "other-connection", (int)UriMatchPart.Path)] + [InlineData("HTTP_URL", "http://otherexample.com/other-foo?bar=2", (int)UriMatchPart.Full)] + [InlineData("HTTP_URL", "http://otherexample.com/other-foo?bar=2", (int)UriMatchPart.Path)] + [InlineData("QUERY_STRING", "bar=2", (int)UriMatchPart.Path)] + [InlineData("REQUEST_FILENAME", "/other-foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "/other-foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "/other-foo", (int)UriMatchPart.Full)] + [InlineData("REQUEST_METHOD", "POST", (int)UriMatchPart.Full)] + public void CheckServerVariableFeatureHasPrecedenceWhenEnabled(string variable, string expected, int uriMatchPart) { // Arrange and Act var testParserContext = new ParserContext("test"); - var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, uriMatchPart, false); + var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, (UriMatchPart)uriMatchPart, false); var httpContext = CreateTestHttpContext(); httpContext.Features.Set(new TestServerVariablesFeature(new Dictionary { @@ -87,26 +87,26 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.IISUrlRewrite } [Theory] - [InlineData("CONTENT_LENGTH", "10", UriMatchPart.Path)] - [InlineData("CONTENT_TYPE", "json", UriMatchPart.Path)] - [InlineData("HTTP_ACCEPT", "accept", UriMatchPart.Path)] - [InlineData("HTTP_COOKIE", "cookie", UriMatchPart.Path)] - [InlineData("HTTP_HOST", "example.com", UriMatchPart.Path)] - [InlineData("HTTP_REFERER", "referer", UriMatchPart.Path)] - [InlineData("HTTP_USER_AGENT", "useragent", UriMatchPart.Path)] - [InlineData("HTTP_CONNECTION", "connection", UriMatchPart.Path)] - [InlineData("HTTP_URL", "/foo", UriMatchPart.Path)] - [InlineData("HTTP_URL", "http://example.com/foo?bar=1", UriMatchPart.Full)] - [InlineData("QUERY_STRING", "bar=1", UriMatchPart.Path)] - [InlineData("REQUEST_FILENAME", "/foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "/foo", UriMatchPart.Path)] - [InlineData("REQUEST_URI", "http://example.com/foo?bar=1", UriMatchPart.Full)] - [InlineData("REQUEST_METHOD", "GET", UriMatchPart.Full)] - public void CheckServerVariableFeatureIsntUsedWhenDisabled(string variable, string expected, UriMatchPart uriMatchPart) + [InlineData("CONTENT_LENGTH", "10", (int)UriMatchPart.Path)] + [InlineData("CONTENT_TYPE", "json", (int)UriMatchPart.Path)] + [InlineData("HTTP_ACCEPT", "accept", (int)UriMatchPart.Path)] + [InlineData("HTTP_COOKIE", "cookie", (int)UriMatchPart.Path)] + [InlineData("HTTP_HOST", "example.com", (int)UriMatchPart.Path)] + [InlineData("HTTP_REFERER", "referer", (int)UriMatchPart.Path)] + [InlineData("HTTP_USER_AGENT", "useragent", (int)UriMatchPart.Path)] + [InlineData("HTTP_CONNECTION", "connection", (int)UriMatchPart.Path)] + [InlineData("HTTP_URL", "/foo", (int)UriMatchPart.Path)] + [InlineData("HTTP_URL", "http://example.com/foo?bar=1", (int)UriMatchPart.Full)] + [InlineData("QUERY_STRING", "bar=1", (int)UriMatchPart.Path)] + [InlineData("REQUEST_FILENAME", "/foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "/foo", (int)UriMatchPart.Path)] + [InlineData("REQUEST_URI", "http://example.com/foo?bar=1", (int)UriMatchPart.Full)] + [InlineData("REQUEST_METHOD", "GET", (int)UriMatchPart.Full)] + public void CheckServerVariableFeatureIsntUsedWhenDisabled(string variable, string expected, int uriMatchPart) { // Arrange and Act var testParserContext = new ParserContext("test"); - var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, uriMatchPart, true); + var serverVar = ServerVariables.FindServerVariable(variable, testParserContext, (UriMatchPart)uriMatchPart, true); var httpContext = CreateTestHttpContext(); httpContext.Features.Set(new TestServerVariablesFeature(new Dictionary { diff --git a/src/Middleware/Rewrite/test/IISUrlRewrite/UrlRewriteApplicationTests.cs b/src/Middleware/Rewrite/test/IISUrlRewrite/UrlRewriteApplicationTests.cs index d1b9a83936..c78a4787e8 100644 --- a/src/Middleware/Rewrite/test/IISUrlRewrite/UrlRewriteApplicationTests.cs +++ b/src/Middleware/Rewrite/test/IISUrlRewrite/UrlRewriteApplicationTests.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlRewrite diff --git a/src/Middleware/Rewrite/test/PatternSegments/ConditionMatchSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/ConditionMatchSegmentTests.cs index a67113954f..e568636304 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/ConditionMatchSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/ConditionMatchSegmentTests.cs @@ -2,8 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/DateTimeSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/DateTimeSegmentTests.cs index 8f5ef184a8..2e142567a6 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/DateTimeSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/DateTimeSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/HeaderSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/HeaderSegmentTests.cs index b8472929b7..9f53cd5254 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/HeaderSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/HeaderSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/src/Middleware/Rewrite/test/PatternSegments/IsHttpsModSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/IsHttpsModSegmentTests.cs index b578b31bac..bd14c17372 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/IsHttpsModSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/IsHttpsModSegmentTests.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/IsHttpsSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/IsHttpsSegmentTests.cs index 789f94e670..2990ebe011 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/IsHttpsSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/IsHttpsSegmentTests.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/IsIPV6SegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/IsIPV6SegmentTests.cs index c787998e9c..3fe803be00 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/IsIPV6SegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/IsIPV6SegmentTests.cs @@ -4,7 +4,7 @@ using System.Net; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/LIteralSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/LIteralSegmentTests.cs index 1bf3e74fee..5269ab07de 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/LIteralSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/LIteralSegmentTests.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/LocalAddressSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/LocalAddressSegmentTests.cs index 07d7254574..a9f26d3373 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/LocalAddressSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/LocalAddressSegmentTests.cs @@ -4,7 +4,7 @@ using System.Net; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/LocalPortSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/LocalPortSegmentTests.cs index 1a3dad1896..7dae569646 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/LocalPortSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/LocalPortSegmentTests.cs @@ -4,7 +4,7 @@ using System.Globalization; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/QueryStringSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/QueryStringSegmentTests.cs index 3e7190ef9d..09ad2e4d69 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/QueryStringSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/QueryStringSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/RemoteAddressSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/RemoteAddressSegmentTests.cs index c7f5ede0dc..ec0316535a 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/RemoteAddressSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/RemoteAddressSegmentTests.cs @@ -3,7 +3,7 @@ using System.Net; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/RemotePortSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/RemotePortSegmentTests.cs index 6980e2379f..fd016fcd6e 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/RemotePortSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/RemotePortSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/RequestFilenameSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/RequestFilenameSegmentTests.cs index 16e051d7af..c4f90e5cae 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/RequestFilenameSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/RequestFilenameSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/RequestMethodSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/RequestMethodSegmentTests.cs index 0fa65a8182..c86ade7db9 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/RequestMethodSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/RequestMethodSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/RuleMatchSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/RuleMatchSegmentTests.cs index 56189c9bee..a7add81115 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/RuleMatchSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/RuleMatchSegmentTests.cs @@ -2,8 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/SchemeSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/SchemeSegmentTests.cs index 3caac305c6..c60463c5a0 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/SchemeSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/SchemeSegmentTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/ServerProtocolSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/ServerProtocolSegmentTests.cs index 9128ef6b32..c1ec80de68 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/ServerProtocolSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/ServerProtocolSegmentTests.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/ToLowerSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/ToLowerSegmentTests.cs index a6b434ff3d..be274a57d0 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/ToLowerSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/ToLowerSegmentTests.cs @@ -2,8 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/UrlEncodeSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/UrlEncodeSegmentTests.cs index 767876a9a5..cf3c65c5e8 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/UrlEncodeSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/UrlEncodeSegmentTests.cs @@ -2,8 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments diff --git a/src/Middleware/Rewrite/test/PatternSegments/UrlSegmentTests.cs b/src/Middleware/Rewrite/test/PatternSegments/UrlSegmentTests.cs index e85c5662b4..cf513624a1 100644 --- a/src/Middleware/Rewrite/test/PatternSegments/UrlSegmentTests.cs +++ b/src/Middleware/Rewrite/test/PatternSegments/UrlSegmentTests.cs @@ -2,8 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite; -using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; +using Microsoft.AspNetCore.Rewrite.IISUrlRewrite; +using Microsoft.AspNetCore.Rewrite.PatternSegments; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments @@ -11,19 +11,19 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments public class UrlSegmentTests { [Theory] - [InlineData("http", "localhost", 80, null, UriMatchPart.Path, "")] - [InlineData("http", "localhost", 80, "", UriMatchPart.Path, "")] - [InlineData("http", "localhost", 80, "/foo/bar", UriMatchPart.Path, "/foo/bar")] - [InlineData("http", "localhost", 80, "/foo:bar", UriMatchPart.Path, "/foo:bar")] - [InlineData("http", "localhost", 80, "/foo bar", UriMatchPart.Path, "/foo%20bar")] - [InlineData("http", "localhost", 80, null, UriMatchPart.Full, "http://localhost:80/")] - [InlineData("http", "localhost", 80, "", UriMatchPart.Full, "http://localhost:80/")] - [InlineData("http", "localhost", 80, "/foo:bar", UriMatchPart.Full, "http://localhost:80/foo:bar")] - [InlineData("http", "localhost", 80, "/foo bar", UriMatchPart.Full, "http://localhost:80/foo%20bar")] - [InlineData("http", "localhost", 80, "/foo/bar", UriMatchPart.Full, "http://localhost:80/foo/bar")] - [InlineData("http", "localhost", 81, "/foo/bar", UriMatchPart.Full, "http://localhost:81/foo/bar")] - [InlineData("https", "localhost", 443, "/foo/bar", UriMatchPart.Full, "https://localhost:443/foo/bar")] - public void AssertSegmentIsCorrect(string scheme, string host, int port, string path, UriMatchPart uriMatchPart, string expectedResult) + [InlineData("http", "localhost", 80, null, (int)UriMatchPart.Path, "")] + [InlineData("http", "localhost", 80, "", (int)UriMatchPart.Path, "")] + [InlineData("http", "localhost", 80, "/foo/bar", (int)UriMatchPart.Path, "/foo/bar")] + [InlineData("http", "localhost", 80, "/foo:bar", (int)UriMatchPart.Path, "/foo:bar")] + [InlineData("http", "localhost", 80, "/foo bar", (int)UriMatchPart.Path, "/foo%20bar")] + [InlineData("http", "localhost", 80, null, (int)UriMatchPart.Full, "http://localhost:80/")] + [InlineData("http", "localhost", 80, "", (int)UriMatchPart.Full, "http://localhost:80/")] + [InlineData("http", "localhost", 80, "/foo:bar", (int)UriMatchPart.Full, "http://localhost:80/foo:bar")] + [InlineData("http", "localhost", 80, "/foo bar", (int)UriMatchPart.Full, "http://localhost:80/foo%20bar")] + [InlineData("http", "localhost", 80, "/foo/bar", (int)UriMatchPart.Full, "http://localhost:80/foo/bar")] + [InlineData("http", "localhost", 81, "/foo/bar", (int)UriMatchPart.Full, "http://localhost:81/foo/bar")] + [InlineData("https", "localhost", 443, "/foo/bar", (int)UriMatchPart.Full, "https://localhost:443/foo/bar")] + public void AssertSegmentIsCorrect(string scheme, string host, int port, string path, int uriMatchPart, string expectedResult) { // Arrange var httpContext = new DefaultHttpContext(); @@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments context.HttpContext = httpContext; // Act - var segment = new UrlSegment(uriMatchPart); + var segment = new UrlSegment((UriMatchPart)uriMatchPart); var results = segment.Evaluate(context, null, null); // Assert diff --git a/src/Middleware/Rewrite/test/UrlActions/AbortActionTests.cs b/src/Middleware/Rewrite/test/UrlActions/AbortActionTests.cs index e39e58fb84..654be9d3e5 100644 --- a/src/Middleware/Rewrite/test/UrlActions/AbortActionTests.cs +++ b/src/Middleware/Rewrite/test/UrlActions/AbortActionTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlActions; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlActions diff --git a/src/Middleware/Rewrite/test/UrlActions/ChangeCookieActionTests.cs b/src/Middleware/Rewrite/test/UrlActions/ChangeCookieActionTests.cs index 20096ef162..38365f7034 100644 --- a/src/Middleware/Rewrite/test/UrlActions/ChangeCookieActionTests.cs +++ b/src/Middleware/Rewrite/test/UrlActions/ChangeCookieActionTests.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlActions; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/src/Middleware/Rewrite/test/UrlActions/ForbiddenActionTests.cs b/src/Middleware/Rewrite/test/UrlActions/ForbiddenActionTests.cs index a9eac5a807..1dd8368792 100644 --- a/src/Middleware/Rewrite/test/UrlActions/ForbiddenActionTests.cs +++ b/src/Middleware/Rewrite/test/UrlActions/ForbiddenActionTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlActions; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlActions diff --git a/src/Middleware/Rewrite/test/UrlActions/GoneActionTests.cs b/src/Middleware/Rewrite/test/UrlActions/GoneActionTests.cs index 00720f85ef..b617332015 100644 --- a/src/Middleware/Rewrite/test/UrlActions/GoneActionTests.cs +++ b/src/Middleware/Rewrite/test/UrlActions/GoneActionTests.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlActions; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlActions diff --git a/src/Middleware/Rewrite/test/UrlMatches/ExactMatchTests.cs b/src/Middleware/Rewrite/test/UrlMatches/ExactMatchTests.cs index 7f7e82b9b2..94fb2f4aa3 100644 --- a/src/Middleware/Rewrite/test/UrlMatches/ExactMatchTests.cs +++ b/src/Middleware/Rewrite/test/UrlMatches/ExactMatchTests.cs @@ -2,9 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlMatches diff --git a/src/Middleware/Rewrite/test/UrlMatches/IntegerMatchTests.cs b/src/Middleware/Rewrite/test/UrlMatches/IntegerMatchTests.cs index 5dd87ca4ad..5979ed6835 100644 --- a/src/Middleware/Rewrite/test/UrlMatches/IntegerMatchTests.cs +++ b/src/Middleware/Rewrite/test/UrlMatches/IntegerMatchTests.cs @@ -4,9 +4,8 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Rewrite; -using Microsoft.AspNetCore.Rewrite.Internal; -using Microsoft.AspNetCore.Rewrite.Internal.UrlActions; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; +using Microsoft.AspNetCore.Rewrite.UrlActions; +using Microsoft.AspNetCore.Rewrite.UrlMatches; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlMatches @@ -21,19 +20,19 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlMatches } [Theory] - [InlineData(1,IntegerOperationType.Equal,"1",true)] - [InlineData(1, IntegerOperationType.NotEqual, "2", true)] - [InlineData(2, IntegerOperationType.Less, "1", true)] - [InlineData(1, IntegerOperationType.LessEqual, "2", false)] - [InlineData(1, IntegerOperationType.Greater, "2", true)] - [InlineData(2, IntegerOperationType.GreaterEqual, "1", false)] - [InlineData(1, IntegerOperationType.Equal, "Not an int", false)] - [InlineData(1, IntegerOperationType.Equal, "", false)] - [InlineData(1, IntegerOperationType.Equal, "2147483648", false)] - public void IntegerMatch_Evaluation_Cases_Tests(int value,IntegerOperationType operation, string input,bool expectedResult) + [InlineData(1, (int)IntegerOperationType.Equal,"1",true)] + [InlineData(1, (int)IntegerOperationType.NotEqual, "2", true)] + [InlineData(2, (int)IntegerOperationType.Less, "1", true)] + [InlineData(1, (int)IntegerOperationType.LessEqual, "2", false)] + [InlineData(1, (int)IntegerOperationType.Greater, "2", true)] + [InlineData(2, (int)IntegerOperationType.GreaterEqual, "1", false)] + [InlineData(1, (int)IntegerOperationType.Equal, "Not an int", false)] + [InlineData(1, (int)IntegerOperationType.Equal, "", false)] + [InlineData(1, (int)IntegerOperationType.Equal, "2147483648", false)] + public void IntegerMatch_Evaluation_Cases_Tests(int value, int operation, string input, bool expectedResult) { var context = new RewriteContext { HttpContext = new DefaultHttpContext() }; - var integerMatch = new IntegerMatch(value, operation); + var integerMatch = new IntegerMatch(value, (IntegerOperationType)operation); var matchResult = integerMatch.Evaluate(input, context); Assert.Equal(expectedResult, matchResult.Success); } diff --git a/src/Middleware/Rewrite/test/UrlMatches/StringMatchTests.cs b/src/Middleware/Rewrite/test/UrlMatches/StringMatchTests.cs index a562fec6e2..857bdfc043 100644 --- a/src/Middleware/Rewrite/test/UrlMatches/StringMatchTests.cs +++ b/src/Middleware/Rewrite/test/UrlMatches/StringMatchTests.cs @@ -1,9 +1,9 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Rewrite.Internal.UrlMatches; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Rewrite.UrlMatches; using Xunit; namespace Microsoft.AspNetCore.Rewrite.Tests.UrlMatches @@ -11,17 +11,17 @@ namespace Microsoft.AspNetCore.Rewrite.Tests.UrlMatches public class StringMatchTests { [Theory] - [InlineData("hi", StringOperationType.Equal,true,"hi",true)] - [InlineData("a", StringOperationType.Greater, true, "b", true)] - [InlineData("a", StringOperationType.GreaterEqual, true, "b", true)] - [InlineData("b", StringOperationType.Less,true, "a", true)] - [InlineData("b", StringOperationType.LessEqual, true, "a", true)] - [InlineData("", StringOperationType.Equal, true, "", true)] - [InlineData(null, StringOperationType.Equal, true, null, true)] - public void StringMatch_Evaluation_Check_Cases(string value, StringOperationType operation, bool ignoreCase, string input, bool expectedResult) + [InlineData("hi", (int)StringOperationType.Equal,true,"hi",true)] + [InlineData("a", (int)StringOperationType.Greater, true, "b", true)] + [InlineData("a", (int)StringOperationType.GreaterEqual, true, "b", true)] + [InlineData("b", (int)StringOperationType.Less,true, "a", true)] + [InlineData("b", (int)StringOperationType.LessEqual, true, "a", true)] + [InlineData("", (int)StringOperationType.Equal, true, "", true)] + [InlineData(null, (int)StringOperationType.Equal, true, null, true)] + public void StringMatch_Evaluation_Check_Cases(string value, int operation, bool ignoreCase, string input, bool expectedResult) { var context = new RewriteContext { HttpContext = new DefaultHttpContext() }; - var stringMatch = new StringMatch(value, operation, ignoreCase); + var stringMatch = new StringMatch(value, (StringOperationType)operation, ignoreCase); var matchResult = stringMatch.Evaluate(input, context); Assert.Equal(expectedResult, matchResult.Success); } diff --git a/src/Middleware/WebSockets/src/Internal/Constants.cs b/src/Middleware/WebSockets/src/Constants.cs similarity index 90% rename from src/Middleware/WebSockets/src/Internal/Constants.cs rename to src/Middleware/WebSockets/src/Constants.cs index 8fb17cf9c0..6208d4914a 100644 --- a/src/Middleware/WebSockets/src/Internal/Constants.cs +++ b/src/Middleware/WebSockets/src/Constants.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.WebSockets.Internal +namespace Microsoft.AspNetCore.WebSockets { internal static class Constants { diff --git a/src/Middleware/WebSockets/src/Internal/HandshakeHelpers.cs b/src/Middleware/WebSockets/src/HandshakeHelpers.cs similarity index 98% rename from src/Middleware/WebSockets/src/Internal/HandshakeHelpers.cs rename to src/Middleware/WebSockets/src/HandshakeHelpers.cs index 551ca879c9..0162751f16 100644 --- a/src/Middleware/WebSockets/src/Internal/HandshakeHelpers.cs +++ b/src/Middleware/WebSockets/src/HandshakeHelpers.cs @@ -8,7 +8,7 @@ using System.Text; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; -namespace Microsoft.AspNetCore.WebSockets.Internal +namespace Microsoft.AspNetCore.WebSockets { internal static class HandshakeHelpers { diff --git a/src/Middleware/WebSockets/src/WebSocketMiddleware.cs b/src/Middleware/WebSockets/src/WebSocketMiddleware.cs index 28f7f3a232..bff8a770d2 100644 --- a/src/Middleware/WebSockets/src/WebSocketMiddleware.cs +++ b/src/Middleware/WebSockets/src/WebSocketMiddleware.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.WebSockets.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; diff --git a/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs b/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs index 61b310f1b0..a997c88214 100644 --- a/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs +++ b/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs @@ -10,7 +10,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.AspNetCore.WebSockets.Internal; using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/src/Middleware/WebSockets/test/UnitTests/WebSocketPair.cs b/src/Middleware/WebSockets/test/UnitTests/WebSocketPair.cs index d3050538a0..efb11af60c 100644 --- a/src/Middleware/WebSockets/test/UnitTests/WebSocketPair.cs +++ b/src/Middleware/WebSockets/test/UnitTests/WebSocketPair.cs @@ -1,6 +1,5 @@ using System; using System.Net.WebSockets; -using Microsoft.AspNetCore.WebSockets.Internal; namespace Microsoft.AspNetCore.WebSockets.Test {