From 66613b194d0df398506249ff581957323c73b80e Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Fri, 22 Nov 2019 00:04:16 -0500 Subject: [PATCH 1/9] Updating descriptions for HTTP classes #17204 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 34 +++++++++- src/Http/Http/src/DefaultHttpContext.cs | 66 +++++++++++++++++++ src/Http/Http/src/HttpContextAccessor.cs | 6 ++ .../src/HttpsRedirectionMiddleware.cs | 7 +- .../src/HttpsRedirectionOptions.cs | 2 +- .../src/WebHostBuilderHttpSysExtensions.cs | 3 + 6 files changed, 113 insertions(+), 5 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index 05a5f2e834..6a3fc6aff3 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -5,12 +5,15 @@ using System; namespace Microsoft.AspNetCore.Http { + /// + /// Contains methods to verify the request method of an HTTP request. + /// public static class HttpMethods { // We are intentionally using 'static readonly' here instead of 'const'. - // 'const' values would be embedded in to each assembly that used them + // 'const' values would be embedded into each assembly that used them // and each consuming assembly would have a different 'string' instance. - // Using .'static readonly' means that all consumers get thee exact same + // Using .'static readonly' means that all consumers get these exact same // 'string' instance, which means the 'ReferenceEquals' checks below work // and allow us to optimize comparisons when these constants are used. @@ -25,46 +28,73 @@ namespace Microsoft.AspNetCore.Http public static readonly string Put = "PUT"; public static readonly string Trace = "TRACE"; + /// + /// Verifies the HTTP request method is CONNECT. + /// public static bool IsConnect(string method) { return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); } + /// + /// Verifies the HTTP request method is DELETE. + /// public static bool IsDelete(string method) { return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); } + /// + /// Verifies the HTTP request method is GET. + /// public static bool IsGet(string method) { return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); } + /// + /// Verifies the HTTP request method is HEAD. + /// public static bool IsHead(string method) { return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); } + /// + /// Verifies the HTTP request method is OPTIONS. + /// public static bool IsOptions(string method) { return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); } + /// + /// Verifies the HTTP request method is PATCH. + /// public static bool IsPatch(string method) { return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); } + /// + /// Verifies the HTTP request method is POST. + /// public static bool IsPost(string method) { return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); } + /// + /// Verifies the HTTP request method is PUT. + /// public static bool IsPut(string method) { return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); } + /// + /// Verifies the HTTP request method is TRACE. + /// public static bool IsTrace(string method) { return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index 7d096f186a..73f932746e 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -13,6 +13,9 @@ using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Http { + /// + /// Represents an implementation of the HTTP Context class with HTTP-specific information for a request. + /// public sealed class DefaultHttpContext : HttpContext { // Lambdas hoisted to static readonly fields to improve inlining https://github.com/dotnet/roslyn/issues/13624 @@ -32,6 +35,9 @@ namespace Microsoft.AspNetCore.Http private DefaultConnectionInfo _connection; private DefaultWebSocketManager _websockets; + /// + /// Initializes a new instance of the DefaultHttpContext class. + /// public DefaultHttpContext() : this(new FeatureCollection()) { @@ -40,6 +46,9 @@ namespace Microsoft.AspNetCore.Http Features.Set(new StreamResponseBodyFeature(Stream.Null)); } + /// + /// Initializes a new instance of the DefaultHttpContext class with the using a collection of AspNetCore.Http.Features. + /// public DefaultHttpContext(IFeatureCollection features) { _features.Initalize(features); @@ -47,6 +56,9 @@ namespace Microsoft.AspNetCore.Http _response = new DefaultHttpResponse(this); } + /// + /// Initialize the current instant of the class with the using a collection of AspNetCore.Http.Features. + /// public void Initialize(IFeatureCollection features) { var revision = features.Revision; @@ -57,6 +69,9 @@ namespace Microsoft.AspNetCore.Http _websockets?.Initialize(features, revision); } + /// + /// Uninitialize the child request, response, connection and websocket object features and reset the class instance features. + /// public void Uninitialize() { _features = default; @@ -66,8 +81,14 @@ namespace Microsoft.AspNetCore.Http _websockets?.Uninitialize(); } + /// + /// Gets or set the FormOptions for this instance. + /// public FormOptions FormOptions { get; set; } + /// + /// Gets or sets the IServiceScopeFactory for this instance. + /// public IServiceScopeFactory ServiceScopeFactory { get; set; } private IItemsFeature ItemsFeature => @@ -92,16 +113,43 @@ namespace Microsoft.AspNetCore.Http private IHttpRequestIdentifierFeature RequestIdentifierFeature => _features.Fetch(ref _features.Cache.RequestIdentifier, _newHttpRequestIdentifierFeature); + /// + /// Returns the Features for this instance. If null, an ObjectDisposedException Exceptioon is thrown. + /// public override IFeatureCollection Features => _features.Collection ?? ContextDisposed(); + /// + /// Returns the HttpRequest of this instance. + /// public override HttpRequest Request => _request; + /// + /// Returns the HttpResponse of this instance. + /// public override HttpResponse Response => _response; + /// + /// Returns the connection information of this instance. + /// + /// + /// If the Connection is null, a new DefaultConnectionInfo object is instantiated using the Features collection of this instance. + /// public override ConnectionInfo Connection => _connection ?? (_connection = new DefaultConnectionInfo(Features)); + /// + /// Returns the Web Socket Manager of this instance. + /// + /// + /// If the Connection is null, a new DefaultWebSocketManager object is instantiated using the Features collection of this instance. + /// public override WebSocketManager WebSockets => _websockets ?? (_websockets = new DefaultWebSocketManager(Features)); + /// + /// Gets or sets the claims principal of this instance. + /// + /// + /// If the ClaimsPrincipal object is null, a new ClaimsPrincipal object is instantiated. + /// public override ClaimsPrincipal User { get @@ -117,30 +165,48 @@ namespace Microsoft.AspNetCore.Http set { HttpAuthenticationFeature.User = value; } } + /// + /// Gets or sets the item feature object(s) of this instance. + /// public override IDictionary Items { get { return ItemsFeature.Items; } set { ItemsFeature.Items = value; } } + /// + /// Gets or sets the service provider feature object of this instance. + /// public override IServiceProvider RequestServices { get { return ServiceProvidersFeature.RequestServices; } set { ServiceProvidersFeature.RequestServices = value; } } + /// + /// Gets or sets the cancellation token object of this instance. + /// public override CancellationToken RequestAborted { get { return LifetimeFeature.RequestAborted; } set { LifetimeFeature.RequestAborted = value; } } + /// + /// Gets or sets the trace identifier of this instance. + /// public override string TraceIdentifier { get { return RequestIdentifierFeature.TraceIdentifier; } set { RequestIdentifierFeature.TraceIdentifier = value; } } + /// + /// Gets or sets the session of this instance. + /// + /// + /// If session feature has not been set, an Invalid Operation Exception is thrown. + /// public override ISession Session { get diff --git a/src/Http/Http/src/HttpContextAccessor.cs b/src/Http/Http/src/HttpContextAccessor.cs index 286151029c..d99e02ef88 100644 --- a/src/Http/Http/src/HttpContextAccessor.cs +++ b/src/Http/Http/src/HttpContextAccessor.cs @@ -5,10 +5,16 @@ using System.Threading; namespace Microsoft.AspNetCore.Http { + /// + /// Represents the properties and methods used to keep access the current HTTP context. + /// public class HttpContextAccessor : IHttpContextAccessor { private static AsyncLocal _httpContextCurrent = new AsyncLocal(); + /// + /// Gets or sets the HTTP context. + /// public HttpContext HttpContext { get diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs index e20e8b8a33..e2926593e2 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs @@ -13,6 +13,9 @@ using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.HttpsPolicy { + /// + /// Provides functionality to redirect client requests to an address that uses the HTTPS protocol. + /// public class HttpsRedirectionMiddleware { private const int PortNotFound = -1; @@ -26,7 +29,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy private readonly ILogger _logger; /// - /// Initializes the HttpsRedirectionMiddleware + /// Initializes the HttpsRedirectionMiddleware. /// /// /// @@ -56,7 +59,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy } /// - /// Initializes the HttpsRedirectionMiddleware + /// Initializes the HttpsRedirectionMiddleware. /// /// /// diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs index 07a166c162..85e177ec25 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.HttpsPolicy { /// - /// Options for the HttpsRedirection middleware + /// Options for the HttpsRedirection middleware. /// public class HttpsRedirectionOptions { diff --git a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs index 7b4caaef62..f62a0982b6 100644 --- a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs +++ b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs @@ -9,6 +9,9 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Hosting { + /// + /// Provides extensions method to use Http.sys as the server for the web host. + /// public static class WebHostBuilderHttpSysExtensions { /// From 5dcb568df026e4d9fdc50450180a4e670590defa Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Fri, 22 Nov 2019 22:27:55 -0500 Subject: [PATCH 2/9] Updating descriptions to add parameters #17204 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 9 ++++++ src/Http/Http/src/DefaultHttpContext.cs | 8 +++-- src/Http/Http/src/HttpContextAccessor.cs | 2 +- src/Http/Http/src/HttpContextFactory.cs | 31 +++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index 6a3fc6aff3..9e4b94949a 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -31,6 +31,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is CONNECT. /// + /// HTTP request method. public static bool IsConnect(string method) { return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); @@ -39,6 +40,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is DELETE. /// + /// HTTP request method. public static bool IsDelete(string method) { return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); @@ -47,6 +49,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is GET. /// + /// HTTP request method. public static bool IsGet(string method) { return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); @@ -55,6 +58,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is HEAD. /// + /// HTTP request method. public static bool IsHead(string method) { return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); @@ -63,6 +67,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is OPTIONS. /// + /// HTTP request method. public static bool IsOptions(string method) { return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); @@ -71,6 +76,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is PATCH. /// + /// HTTP request method. public static bool IsPatch(string method) { return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); @@ -79,6 +85,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is POST. /// + /// HTTP request method. public static bool IsPost(string method) { return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); @@ -87,6 +94,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is PUT. /// + /// HTTP request method. public static bool IsPut(string method) { return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); @@ -95,6 +103,7 @@ namespace Microsoft.AspNetCore.Http /// /// Verifies the HTTP request method is TRACE. /// + /// HTTP request method. public static bool IsTrace(string method) { return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index 73f932746e..70c1b0d29c 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Http { /// - /// Represents an implementation of the HTTP Context class with HTTP-specific information for a request. + /// Represents an implementation of the HTTP Context class. /// public sealed class DefaultHttpContext : HttpContext { @@ -47,8 +47,9 @@ namespace Microsoft.AspNetCore.Http } /// - /// Initializes a new instance of the DefaultHttpContext class with the using a collection of AspNetCore.Http.Features. + /// Initializes a new instance of the DefaultHttpContext class with options passed in. /// + /// Options to set when instantianting the Default HTTP context object. public DefaultHttpContext(IFeatureCollection features) { _features.Initalize(features); @@ -57,8 +58,9 @@ namespace Microsoft.AspNetCore.Http } /// - /// Initialize the current instant of the class with the using a collection of AspNetCore.Http.Features. + /// Initialize the current instant of the class with options passed in. /// + /// Options to initialize the Default HTTP context object. public void Initialize(IFeatureCollection features) { var revision = features.Revision; diff --git a/src/Http/Http/src/HttpContextAccessor.cs b/src/Http/Http/src/HttpContextAccessor.cs index d99e02ef88..e910dcdfbb 100644 --- a/src/Http/Http/src/HttpContextAccessor.cs +++ b/src/Http/Http/src/HttpContextAccessor.cs @@ -6,7 +6,7 @@ using System.Threading; namespace Microsoft.AspNetCore.Http { /// - /// Represents the properties and methods used to keep access the current HTTP context. + /// Represents the properties and methods used to access the current HTTP context. /// public class HttpContextAccessor : IHttpContextAccessor { diff --git a/src/Http/Http/src/HttpContextFactory.cs b/src/Http/Http/src/HttpContextFactory.cs index 3121c1704b..10688b0572 100644 --- a/src/Http/Http/src/HttpContextFactory.cs +++ b/src/Http/Http/src/HttpContextFactory.cs @@ -8,6 +8,9 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Http { + /// + /// Represents methods used to create an HTTP context object. + /// [Obsolete("This is obsolete and will be removed in a future version. Use DefaultHttpContextFactory instead.")] public class HttpContextFactory : IHttpContextFactory { @@ -15,21 +18,41 @@ namespace Microsoft.AspNetCore.Http private readonly FormOptions _formOptions; private readonly IServiceScopeFactory _serviceScopeFactory; + /// + /// Initializes a new instance of the HttpContext class with options passed in. + /// + /// Options to set when instantianting the HTTP context object. public HttpContextFactory(IOptions formOptions) : this(formOptions, serviceScopeFactory: null) { } + /// + /// Initializes a new instance of the DefaultHttpContext class with options passed in. + /// + /// Options to set when instantianting the HTTP context object. + /// Factory object used to create the service scope for the HTTP context. public HttpContextFactory(IOptions formOptions, IServiceScopeFactory serviceScopeFactory) : this(formOptions, serviceScopeFactory, httpContextAccessor: null) { } + /// + /// Initializes a new instance of the DefaultHttpContext class with options passed in. + /// + /// Options to set when instantianting the HTTP context object. + /// Object to be used to access the HTTP context instance. public HttpContextFactory(IOptions formOptions, IHttpContextAccessor httpContextAccessor) : this(formOptions, serviceScopeFactory: null, httpContextAccessor: httpContextAccessor) { } + /// + /// Initializes a new instance of the DefaultHttpContext class with options passed in. + /// + /// Options to set when instantianting the HTTP context object. + /// Factory object used to create the service scope for the HTTP context. + /// Options to set when instantianting the Default HTTP context object. public HttpContextFactory(IOptions formOptions, IServiceScopeFactory serviceScopeFactory, IHttpContextAccessor httpContextAccessor) { if (formOptions == null) @@ -47,6 +70,10 @@ namespace Microsoft.AspNetCore.Http _httpContextAccessor = httpContextAccessor; } + /// + /// Initializes a new instance of the DefaultHttpContext class with options passed in. + /// + /// Options to set when instantianting the Default HTTP context object. public HttpContext Create(IFeatureCollection featureCollection) { if (featureCollection == null) @@ -66,6 +93,10 @@ namespace Microsoft.AspNetCore.Http return httpContext; } + /// + /// Sets the HTTP context object to null for garbage collection. + /// + /// HTTP context to dispose. public void Dispose(HttpContext httpContext) { if (_httpContextAccessor != null) From d2f2ed99fc24508ce4efd4d7b491dbc3f33e32fb Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Sat, 23 Nov 2019 17:23:18 -0500 Subject: [PATCH 3/9] Updating method descriptions as per review suggestions #17349 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 18 +++++++++--------- .../src/HttpsRedirectionMiddleware.cs | 2 +- .../HttpsPolicy/src/HttpsRedirectionOptions.cs | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index 9e4b94949a..07a6a15a51 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Http public static readonly string Trace = "TRACE"; /// - /// Verifies the HTTP request method is CONNECT. + /// Returns a value that indicates if the HTTP request method is CONNECT. /// /// HTTP request method. public static bool IsConnect(string method) @@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is DELETE. + /// Returns a value that indicates if the HTTP request method is DELETE. /// /// HTTP request method. public static bool IsDelete(string method) @@ -47,7 +47,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is GET. + /// Returns a value that indicates if the HTTP request method is GET. /// /// HTTP request method. public static bool IsGet(string method) @@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is HEAD. + /// Returns a value that indicates if the HTTP request method is HEAD. /// /// HTTP request method. public static bool IsHead(string method) @@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is OPTIONS. + /// Returns a value that indicates if the HTTP request method is OPTIONS. /// /// HTTP request method. public static bool IsOptions(string method) @@ -74,7 +74,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is PATCH. + /// Returns a value that indicates if the HTTP request method is PATCH. /// /// HTTP request method. public static bool IsPatch(string method) @@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is POST. + /// Returns a value that indicates if the HTTP request method is POST. /// /// HTTP request method. public static bool IsPost(string method) @@ -92,7 +92,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is PUT. + /// Returns a value that indicates if the HTTP request method is PUT. /// /// HTTP request method. public static bool IsPut(string method) @@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Verifies the HTTP request method is TRACE. + /// Returns a value that indicates if the HTTP request method is TRACE. /// /// HTTP request method. public static bool IsTrace(string method) diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs index e2926593e2..51925f22ff 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy private readonly ILogger _logger; /// - /// Initializes the HttpsRedirectionMiddleware. + /// Initializes . /// /// /// diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs index 85e177ec25..0e1c625bd7 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionOptions.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.HttpsPolicy { /// - /// Options for the HttpsRedirection middleware. + /// Options for the HTTPS Redirection Middleware. /// public class HttpsRedirectionOptions { From aeb8ab554a6c3febba66aea330090f270c4ea9c7 Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Sat, 23 Nov 2019 17:26:22 -0500 Subject: [PATCH 4/9] Updating the Http.sys server name in method descriptions #17349 --- src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs index f62a0982b6..46b9eb8b4c 100644 --- a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs +++ b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Hosting public static class WebHostBuilderHttpSysExtensions { /// - /// Specify HttpSys as the server to be used by the web host. + /// Specify Http.sys as the server to be used by the web host. /// /// /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure. @@ -41,13 +41,13 @@ namespace Microsoft.AspNetCore.Hosting } /// - /// Specify HttpSys as the server to be used by the web host. + /// Specify Http.sys as the server to be used by the web host. /// /// /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure. /// /// - /// A callback to configure HttpSys options. + /// A callback to configure Http.sys options. /// /// /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder. From 7c8d0f89f83119b7671152cfd6af68c2419517a6 Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Sat, 23 Nov 2019 18:27:12 -0500 Subject: [PATCH 5/9] Additional class and methods description changes including adding class references and inheriting docs #17349 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 45 ++++++++-- src/Http/Http/src/DefaultHttpContext.cs | 82 +++++++------------ src/Http/Http/src/HttpContextAccessor.cs | 6 +- .../src/HttpsRedirectionMiddleware.cs | 6 +- 4 files changed, 70 insertions(+), 69 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index 07a6a15a51..89f96a73fe 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -31,7 +31,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is CONNECT. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsConnect(string method) { return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); @@ -40,7 +43,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is DELETE. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsDelete(string method) { return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); @@ -49,7 +55,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is GET. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsGet(string method) { return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); @@ -58,7 +67,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is HEAD. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsHead(string method) { return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); @@ -67,7 +79,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is OPTIONS. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsOptions(string method) { return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); @@ -76,7 +91,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is PATCH. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsPatch(string method) { return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); @@ -85,7 +103,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is POST. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsPost(string method) { return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); @@ -94,7 +115,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is PUT. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsPut(string method) { return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); @@ -103,7 +127,10 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is TRACE. /// - /// HTTP request method. + /// The HTTP request method. + /// + /// The System.Boolean. + /// public static bool IsTrace(string method) { return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index 70c1b0d29c..303dfbb3bc 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Http private DefaultWebSocketManager _websockets; /// - /// Initializes a new instance of the DefaultHttpContext class. + /// Initializes a new instance of the class. /// public DefaultHttpContext() : this(new FeatureCollection()) @@ -47,9 +47,9 @@ namespace Microsoft.AspNetCore.Http } /// - /// Initializes a new instance of the DefaultHttpContext class with options passed in. + /// Initializes a new instance of the class with provided features. /// - /// Options to set when instantianting the Default HTTP context object. + /// Initial set of features for the . public DefaultHttpContext(IFeatureCollection features) { _features.Initalize(features); @@ -58,9 +58,12 @@ namespace Microsoft.AspNetCore.Http } /// - /// Initialize the current instant of the class with options passed in. + /// Reinitialize the current instant of the class with features passed in. /// - /// Options to initialize the Default HTTP context object. + /// + /// This method allows the consumer to re-use the for another request, rather than having to allocate a new instance. + /// + /// The new set of features for the . public void Initialize(IFeatureCollection features) { var revision = features.Revision; @@ -72,7 +75,7 @@ namespace Microsoft.AspNetCore.Http } /// - /// Uninitialize the child request, response, connection and websocket object features and reset the class instance features. + /// Uninitialize all the features in the . /// public void Uninitialize() { @@ -84,13 +87,19 @@ namespace Microsoft.AspNetCore.Http } /// - /// Gets or set the FormOptions for this instance. + /// Gets or set the for this instance. /// + /// + /// The Microsoft.AspNetCore.Http.Features.FormOptions. + /// public FormOptions FormOptions { get; set; } /// - /// Gets or sets the IServiceScopeFactory for this instance. + /// Gets or sets the for this instance. /// + /// + /// The Microsoft.Extensions.DependencyInjection.IServiceScopeFactory. + /// public IServiceScopeFactory ServiceScopeFactory { get; set; } private IItemsFeature ItemsFeature => @@ -115,43 +124,22 @@ namespace Microsoft.AspNetCore.Http private IHttpRequestIdentifierFeature RequestIdentifierFeature => _features.Fetch(ref _features.Cache.RequestIdentifier, _newHttpRequestIdentifierFeature); - /// - /// Returns the Features for this instance. If null, an ObjectDisposedException Exceptioon is thrown. - /// + /// public override IFeatureCollection Features => _features.Collection ?? ContextDisposed(); - /// - /// Returns the HttpRequest of this instance. - /// + /// public override HttpRequest Request => _request; - /// - /// Returns the HttpResponse of this instance. - /// + /// public override HttpResponse Response => _response; - /// - /// Returns the connection information of this instance. - /// - /// - /// If the Connection is null, a new DefaultConnectionInfo object is instantiated using the Features collection of this instance. - /// + /// public override ConnectionInfo Connection => _connection ?? (_connection = new DefaultConnectionInfo(Features)); - /// - /// Returns the Web Socket Manager of this instance. - /// - /// - /// If the Connection is null, a new DefaultWebSocketManager object is instantiated using the Features collection of this instance. - /// + /// public override WebSocketManager WebSockets => _websockets ?? (_websockets = new DefaultWebSocketManager(Features)); - /// - /// Gets or sets the claims principal of this instance. - /// - /// - /// If the ClaimsPrincipal object is null, a new ClaimsPrincipal object is instantiated. - /// + /// public override ClaimsPrincipal User { get @@ -167,48 +155,35 @@ namespace Microsoft.AspNetCore.Http set { HttpAuthenticationFeature.User = value; } } - /// - /// Gets or sets the item feature object(s) of this instance. - /// + /// public override IDictionary Items { get { return ItemsFeature.Items; } set { ItemsFeature.Items = value; } } - /// - /// Gets or sets the service provider feature object of this instance. - /// + /// public override IServiceProvider RequestServices { get { return ServiceProvidersFeature.RequestServices; } set { ServiceProvidersFeature.RequestServices = value; } } - /// - /// Gets or sets the cancellation token object of this instance. - /// + /// public override CancellationToken RequestAborted { get { return LifetimeFeature.RequestAborted; } set { LifetimeFeature.RequestAborted = value; } } - /// - /// Gets or sets the trace identifier of this instance. - /// + /// public override string TraceIdentifier { get { return RequestIdentifierFeature.TraceIdentifier; } set { RequestIdentifierFeature.TraceIdentifier = value; } } - /// - /// Gets or sets the session of this instance. - /// - /// - /// If session feature has not been set, an Invalid Operation Exception is thrown. - /// + /// public override ISession Session { get @@ -234,6 +209,7 @@ namespace Microsoft.AspNetCore.Http [EditorBrowsable(EditorBrowsableState.Never)] public HttpContext HttpContext => this; + /// public override void Abort() { LifetimeFeature.Abort(); diff --git a/src/Http/Http/src/HttpContextAccessor.cs b/src/Http/Http/src/HttpContextAccessor.cs index e910dcdfbb..deea3c266e 100644 --- a/src/Http/Http/src/HttpContextAccessor.cs +++ b/src/Http/Http/src/HttpContextAccessor.cs @@ -6,15 +6,13 @@ using System.Threading; namespace Microsoft.AspNetCore.Http { /// - /// Represents the properties and methods used to access the current HTTP context. + /// Provides an implementation of based on the current execution context. /// public class HttpContextAccessor : IHttpContextAccessor { private static AsyncLocal _httpContextCurrent = new AsyncLocal(); - /// - /// Gets or sets the HTTP context. - /// + /// public HttpContext HttpContext { get diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs index 51925f22ff..9d0778bf6d 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs @@ -14,7 +14,7 @@ using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.HttpsPolicy { /// - /// Provides functionality to redirect client requests to an address that uses the HTTPS protocol. + /// Middleware that redirects non-HTTPS requests to an HTTPS URL. /// public class HttpsRedirectionMiddleware { @@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy } /// - /// Initializes the HttpsRedirectionMiddleware. + /// Initializes . /// /// /// @@ -74,7 +74,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy } /// - /// Invokes the HttpsRedirectionMiddleware + /// Invokes the HttpsRedirectionMiddleware. /// /// /// From ed5a43d5adde8048aed9118ceed64976d9c2e138 Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Mon, 25 Nov 2019 22:20:29 -0500 Subject: [PATCH 6/9] updating the return statements for specific methods #17349 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 18 +++++++++--------- src/Http/Http/src/DefaultHttpContext.cs | 8 ++++---- .../src/WebHostBuilderHttpSysExtensions.cs | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index 89f96a73fe..a921ea0a84 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is CONNECT; otherwise, . /// public static bool IsConnect(string method) { @@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is DELETE; otherwise, . /// public static bool IsDelete(string method) { @@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is GET; otherwise, . /// public static bool IsGet(string method) { @@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is HEAD; otherwise, . /// public static bool IsHead(string method) { @@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is OPTIONS; otherwise, . /// public static bool IsOptions(string method) { @@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is PATCH; otherwise, . /// public static bool IsPatch(string method) { @@ -105,7 +105,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is POST; otherwise, . /// public static bool IsPost(string method) { @@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is PUT; otherwise, . /// public static bool IsPut(string method) { @@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.Http /// /// The HTTP request method. /// - /// The System.Boolean. + /// if the method is TRACE; otherwise, . /// public static bool IsTrace(string method) { diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index 303dfbb3bc..06f4299191 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -89,16 +89,16 @@ namespace Microsoft.AspNetCore.Http /// /// Gets or set the for this instance. /// - /// - /// The Microsoft.AspNetCore.Http.Features.FormOptions. + /// + /// /// public FormOptions FormOptions { get; set; } /// /// Gets or sets the for this instance. /// - /// - /// The Microsoft.Extensions.DependencyInjection.IServiceScopeFactory. + /// + /// /// public IServiceScopeFactory ServiceScopeFactory { get; set; } diff --git a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs index 46b9eb8b4c..d8a9deb8c3 100644 --- a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs +++ b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Hosting /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure. /// /// - /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder. + /// A reference to the parameter object. /// public static IWebHostBuilder UseHttpSys(this IWebHostBuilder hostBuilder) { @@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Hosting /// A callback to configure Http.sys options. /// /// - /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder. + /// A reference to the parameter object. /// public static IWebHostBuilder UseHttpSys(this IWebHostBuilder hostBuilder, Action options) { From 10d5a0ba62626fc69bafa6a81181fb367da8ff7a Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Wed, 4 Dec 2019 20:07:14 -0500 Subject: [PATCH 7/9] Correcting XML closing tags #17349 --- src/Http/Http.Abstractions/src/HttpMethods.cs | 20 +++++++++---------- src/Http/Http/src/DefaultHttpContext.cs | 14 ++++++------- src/Http/Http/src/HttpContextAccessor.cs | 2 +- src/Http/Http/src/HttpContextFactory.cs | 14 ++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs index a921ea0a84..350b98faf2 100644 --- a/src/Http/Http.Abstractions/src/HttpMethods.cs +++ b/src/Http/Http.Abstractions/src/HttpMethods.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Http { /// /// Contains methods to verify the request method of an HTTP request. - /// + /// public static class HttpMethods { // We are intentionally using 'static readonly' here instead of 'const'. @@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is CONNECT. - /// + /// /// The HTTP request method. /// /// if the method is CONNECT; otherwise, . @@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is DELETE. - /// + /// /// The HTTP request method. /// /// if the method is DELETE; otherwise, . @@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is GET. - /// + /// /// The HTTP request method. /// /// if the method is GET; otherwise, . @@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is HEAD. - /// + /// /// The HTTP request method. /// /// if the method is HEAD; otherwise, . @@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is OPTIONS. - /// + /// /// The HTTP request method. /// /// if the method is OPTIONS; otherwise, . @@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is PATCH. - /// + /// /// The HTTP request method. /// /// if the method is PATCH; otherwise, . @@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is POST. - /// + /// /// The HTTP request method. /// /// if the method is POST; otherwise, . @@ -114,7 +114,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is PUT. - /// + /// /// The HTTP request method. /// /// if the method is PUT; otherwise, . @@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a value that indicates if the HTTP request method is TRACE. - /// + /// /// The HTTP request method. /// /// if the method is TRACE; otherwise, . diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index 06f4299191..ebe0816633 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Http { /// /// Represents an implementation of the HTTP Context class. - /// + /// public sealed class DefaultHttpContext : HttpContext { // Lambdas hoisted to static readonly fields to improve inlining https://github.com/dotnet/roslyn/issues/13624 @@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the class. - /// + /// public DefaultHttpContext() : this(new FeatureCollection()) { @@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the class with provided features. - /// + /// /// Initial set of features for the . public DefaultHttpContext(IFeatureCollection features) { @@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Http /// /// Reinitialize the current instant of the class with features passed in. - /// + /// /// /// This method allows the consumer to re-use the for another request, rather than having to allocate a new instance. /// @@ -76,7 +76,7 @@ namespace Microsoft.AspNetCore.Http /// /// Uninitialize all the features in the . - /// + /// public void Uninitialize() { _features = default; @@ -88,7 +88,7 @@ namespace Microsoft.AspNetCore.Http /// /// Gets or set the for this instance. - /// + /// /// /// /// @@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Http /// /// Gets or sets the for this instance. - /// + /// /// /// /// diff --git a/src/Http/Http/src/HttpContextAccessor.cs b/src/Http/Http/src/HttpContextAccessor.cs index deea3c266e..762e454c42 100644 --- a/src/Http/Http/src/HttpContextAccessor.cs +++ b/src/Http/Http/src/HttpContextAccessor.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Http { /// /// Provides an implementation of based on the current execution context. - /// + /// public class HttpContextAccessor : IHttpContextAccessor { private static AsyncLocal _httpContextCurrent = new AsyncLocal(); diff --git a/src/Http/Http/src/HttpContextFactory.cs b/src/Http/Http/src/HttpContextFactory.cs index 10688b0572..edddc658d3 100644 --- a/src/Http/Http/src/HttpContextFactory.cs +++ b/src/Http/Http/src/HttpContextFactory.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Http { /// /// Represents methods used to create an HTTP context object. - /// + /// [Obsolete("This is obsolete and will be removed in a future version. Use DefaultHttpContextFactory instead.")] public class HttpContextFactory : IHttpContextFactory { @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the HttpContext class with options passed in. - /// + /// /// Options to set when instantianting the HTTP context object. public HttpContextFactory(IOptions formOptions) : this(formOptions, serviceScopeFactory: null) @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the DefaultHttpContext class with options passed in. - /// + /// /// Options to set when instantianting the HTTP context object. /// Factory object used to create the service scope for the HTTP context. public HttpContextFactory(IOptions formOptions, IServiceScopeFactory serviceScopeFactory) @@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the DefaultHttpContext class with options passed in. - /// + /// /// Options to set when instantianting the HTTP context object. /// Object to be used to access the HTTP context instance. public HttpContextFactory(IOptions formOptions, IHttpContextAccessor httpContextAccessor) @@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the DefaultHttpContext class with options passed in. - /// + /// /// Options to set when instantianting the HTTP context object. /// Factory object used to create the service scope for the HTTP context. /// Options to set when instantianting the Default HTTP context object. @@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.Http /// /// Initializes a new instance of the DefaultHttpContext class with options passed in. - /// + /// /// Options to set when instantianting the Default HTTP context object. public HttpContext Create(IFeatureCollection featureCollection) { @@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Http /// /// Sets the HTTP context object to null for garbage collection. - /// + /// /// HTTP context to dispose. public void Dispose(HttpContext httpContext) { From a71aa8a5bc3950b8ff8abb7365051d7958023c2f Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Wed, 4 Dec 2019 22:54:00 -0500 Subject: [PATCH 8/9] Correcting closing XML remark tag #17349 --- src/Http/Http/src/DefaultHttpContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Http/src/DefaultHttpContext.cs b/src/Http/Http/src/DefaultHttpContext.cs index ebe0816633..59c7739e86 100644 --- a/src/Http/Http/src/DefaultHttpContext.cs +++ b/src/Http/Http/src/DefaultHttpContext.cs @@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Http /// /// /// This method allows the consumer to re-use the for another request, rather than having to allocate a new instance. - /// + /// /// The new set of features for the . public void Initialize(IFeatureCollection features) { From d4f380f67a6e61521f33872e4850c95c7a298ad9 Mon Sep 17 00:00:00 2001 From: Dairai Nyabando Date: Wed, 4 Dec 2019 23:04:39 -0500 Subject: [PATCH 9/9] Removing unnecessary param tags and words #17349 --- src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs | 2 +- src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs index 9d0778bf6d..1a67121215 100644 --- a/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs +++ b/src/Middleware/HttpsPolicy/src/HttpsRedirectionMiddleware.cs @@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy /// /// /// - /// The + /// public HttpsRedirectionMiddleware(RequestDelegate next, IOptions options, IConfiguration config, ILoggerFactory loggerFactory, IServerAddressesFeature serverAddressesFeature) : this(next, options, config, loggerFactory) diff --git a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs index d8a9deb8c3..f7c2b9445f 100644 --- a/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs +++ b/src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Hosting /// The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure. /// /// - /// A reference to the parameter object. + /// A reference to the parameter object. /// public static IWebHostBuilder UseHttpSys(this IWebHostBuilder hostBuilder) { @@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Hosting /// A callback to configure Http.sys options. /// /// - /// A reference to the parameter object. + /// A reference to the parameter object. /// public static IWebHostBuilder UseHttpSys(this IWebHostBuilder hostBuilder, Action options) {