From 86705673c7e341c9a58d9a99d9d5192fb4329104 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 14 Oct 2020 22:02:24 +0100 Subject: [PATCH] XML docs for Middleware: Localization, Localization.Routing, ResponseCompression (#26889) * XML docs for Middleware/Localization and Localization.Routing * XML docs for Middleware/ResponseCompression --- .../Microsoft.AspNetCore.Localization.Routing.csproj | 2 +- .../Localization/src/ApplicationBuilderExtensions.cs | 12 ++++++------ .../src/Microsoft.AspNetCore.Localization.csproj | 2 +- ...RequestLocalizationServiceCollectionExtensions.cs | 4 ++-- .../src/BrotliCompressionProvider.cs | 2 +- .../src/GzipCompressionProvider.cs | 2 +- .../src/IResponseCompressionProvider.cs | 10 +++++----- .../Microsoft.AspNetCore.ResponseCompression.csproj | 1 + .../src/ResponseCompressionMiddleware.cs | 8 ++++---- .../src/ResponseCompressionProvider.cs | 2 +- .../src/ResponseCompressionServicesExtensions.cs | 4 ++-- 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj b/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj index 3fbf8734b6..56bd8e7a83 100644 --- a/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj +++ b/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj @@ -5,7 +5,7 @@ Provides a request culture provider which gets culture and ui-culture from request's route data. $(DefaultNetCoreTargetFramework) true - $(NoWarn);CS1591 + $(NoWarn.Replace('1591', '')) true aspnetcore;localization false diff --git a/src/Middleware/Localization/src/ApplicationBuilderExtensions.cs b/src/Middleware/Localization/src/ApplicationBuilderExtensions.cs index 9f2a0dac59..819c5d36d3 100644 --- a/src/Middleware/Localization/src/ApplicationBuilderExtensions.cs +++ b/src/Middleware/Localization/src/ApplicationBuilderExtensions.cs @@ -1,5 +1,5 @@ -// 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. +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNetCore.Localization; @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Builder { throw new ArgumentNullException(nameof(app)); } - + if (options == null) { throw new ArgumentNullException(nameof(options)); @@ -54,10 +54,10 @@ namespace Microsoft.AspNetCore.Builder /// /// Adds the to automatically set culture information for - /// requests based on information provided by the client. + /// requests based on information provided by the client. /// /// The . - /// + /// A callback that configures the . /// /// This will going to instantiate a new that doesn't come from the services. /// @@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Builder /// /// Adds the to automatically set culture information for - /// requests based on information provided by the client. + /// requests based on information provided by the client. /// /// The . /// The culture names to be added by the application, which is represents both supported cultures and UI cultures. diff --git a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj index 20a32d0507..be913c0c66 100644 --- a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj +++ b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj @@ -5,7 +5,7 @@ ASP.NET Core middleware for automatically applying culture information to HTTP requests. Culture information can be specified in the HTTP header, query string, cookie, or custom source. $(DefaultNetCoreTargetFramework) true - $(NoWarn);CS1591 + $(NoWarn.Replace('1591', '')) true aspnetcore;localization false diff --git a/src/Middleware/Localization/src/RequestLocalizationServiceCollectionExtensions.cs b/src/Middleware/Localization/src/RequestLocalizationServiceCollectionExtensions.cs index d261ab7b07..9e0cf69953 100644 --- a/src/Middleware/Localization/src/RequestLocalizationServiceCollectionExtensions.cs +++ b/src/Middleware/Localization/src/RequestLocalizationServiceCollectionExtensions.cs @@ -16,7 +16,7 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The for adding services. /// A delegate to configure the . - /// + /// The . public static IServiceCollection AddRequestLocalization(this IServiceCollection services, Action configureOptions) { if (services == null) @@ -36,7 +36,7 @@ namespace Microsoft.Extensions.DependencyInjection /// /// The for adding services. /// A delegate to configure the . - /// + /// The . public static IServiceCollection AddRequestLocalization(this IServiceCollection services, Action configureOptions) where TService : class { if (services == null) diff --git a/src/Middleware/ResponseCompression/src/BrotliCompressionProvider.cs b/src/Middleware/ResponseCompression/src/BrotliCompressionProvider.cs index 6cc0a88d5d..55f2939b80 100644 --- a/src/Middleware/ResponseCompression/src/BrotliCompressionProvider.cs +++ b/src/Middleware/ResponseCompression/src/BrotliCompressionProvider.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.ResponseCompression /// /// Creates a new instance of with options. /// - /// + /// The options for this instance. public BrotliCompressionProvider(IOptions options) { if (options == null) diff --git a/src/Middleware/ResponseCompression/src/GzipCompressionProvider.cs b/src/Middleware/ResponseCompression/src/GzipCompressionProvider.cs index 0a001e0d53..9f96e5491c 100644 --- a/src/Middleware/ResponseCompression/src/GzipCompressionProvider.cs +++ b/src/Middleware/ResponseCompression/src/GzipCompressionProvider.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.ResponseCompression /// /// Creates a new instance of GzipCompressionProvider with options. /// - /// + /// The options for this instance. public GzipCompressionProvider(IOptions options) { if (options == null) diff --git a/src/Middleware/ResponseCompression/src/IResponseCompressionProvider.cs b/src/Middleware/ResponseCompression/src/IResponseCompressionProvider.cs index c206acbb57..c3edc46b12 100644 --- a/src/Middleware/ResponseCompression/src/IResponseCompressionProvider.cs +++ b/src/Middleware/ResponseCompression/src/IResponseCompressionProvider.cs @@ -13,22 +13,22 @@ namespace Microsoft.AspNetCore.ResponseCompression /// /// Examines the request and selects an acceptable compression provider, if any. /// - /// + /// The . /// A compression provider or null if compression should not be used. ICompressionProvider GetCompressionProvider(HttpContext context); /// /// Examines the response on first write to see if compression should be used. /// - /// - /// + /// The . + /// if the response should be compressed, otherwise . bool ShouldCompressResponse(HttpContext context); /// /// Examines the request to see if compression should be used for response. /// - /// - /// + /// The . + /// if the request accepts compression, otherwise . bool CheckRequestAcceptsCompression(HttpContext context); } } diff --git a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj index d63d281422..44af1104da 100644 --- a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj @@ -4,6 +4,7 @@ ASP.NET Core middleware for HTTP Response compression. $(DefaultNetCoreTargetFramework) true + $(NoWarn.Replace('1591', '')) true aspnetcore false diff --git a/src/Middleware/ResponseCompression/src/ResponseCompressionMiddleware.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionMiddleware.cs index 16a16d233b..0d0715db21 100644 --- a/src/Middleware/ResponseCompression/src/ResponseCompressionMiddleware.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionMiddleware.cs @@ -21,8 +21,8 @@ namespace Microsoft.AspNetCore.ResponseCompression /// /// Initialize the Response Compression middleware. /// - /// - /// + /// The delegate representing the remaining middleware in the request pipeline. + /// The . public ResponseCompressionMiddleware(RequestDelegate next, IResponseCompressionProvider provider) { if (next == null) @@ -41,8 +41,8 @@ namespace Microsoft.AspNetCore.ResponseCompression /// /// Invoke the middleware. /// - /// - /// + /// The . + /// A task that represents the execution of this middleware. public async Task Invoke(HttpContext context) { if (!_provider.CheckRequestAcceptsCompression(context)) diff --git a/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs index 8592f25260..dbffed6357 100644 --- a/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionProvider.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.ResponseCompression /// If no compression providers are specified then GZip is used by default. /// /// Services to use when instantiating compression providers. - /// + /// The options for this instance. public ResponseCompressionProvider(IServiceProvider services, IOptions options) { if (services == null) diff --git a/src/Middleware/ResponseCompression/src/ResponseCompressionServicesExtensions.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionServicesExtensions.cs index 8d0b1ed2b3..f089cea6a8 100644 --- a/src/Middleware/ResponseCompression/src/ResponseCompressionServicesExtensions.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionServicesExtensions.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Builder /// Add response compression services. /// /// The for adding services. - /// + /// The . public static IServiceCollection AddResponseCompression(this IServiceCollection services) { if (services == null) @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Builder /// /// The for adding services. /// A delegate to configure the . - /// + /// The . public static IServiceCollection AddResponseCompression(this IServiceCollection services, Action configureOptions) { if (services == null)