From e78a6521b97bc490273f9e70a1fd0990ce0c8a8e Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Tue, 12 Mar 2019 13:39:36 -0700 Subject: [PATCH] Make naming of IEndpointRouteBuilderConsistent across usages. --- ...rosoft.AspNetCore.Routing.netcoreapp3.0.cs | 32 +++---- .../Builder/EndpointRouteBuilderExtensions.cs | 90 +++++++++---------- .../FallbackEndpointRouteBuilderExtensions.cs | 20 ++--- ...FrameworkEndpointRouteBuilderExtensions.cs | 10 +-- .../EndpointRouteBuilderExtensions.cs | 10 +-- .../EndpointRouteBuilderExtensions.cs | 10 +-- ....Diagnostics.HealthChecks.netcoreapp3.0.cs | 6 +- ...althCheckEndpointRouteBuilderExtensions.cs | 44 ++++----- ...ft.AspNetCore.StaticFiles.netcoreapp3.0.cs | 8 +- ...aticFilesEndpointRouteBuilderExtensions.cs | 44 ++++----- ...osoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs | 4 +- ...pNetCore.Http.Connections.netcoreapp3.0.cs | 8 +- ...onnectionEndpointRouteBuilderExtensions.cs | 34 +++---- ...rosoft.AspNetCore.SignalR.netcoreapp3.0.cs | 4 +- .../src/HubEndpointRouteBuilderExtensions.cs | 14 +-- 15 files changed, 169 insertions(+), 169 deletions(-) diff --git a/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs b/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs index 1e96d95495..47938611d6 100644 --- a/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs +++ b/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs @@ -5,20 +5,20 @@ namespace Microsoft.AspNetCore.Builder { public static partial class EndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDelete(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDelete(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPost(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPost(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPut(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPut(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapVerbs(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, System.Collections.Generic.IList httpMethods, params object[] metadata) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapVerbs(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, System.Collections.Generic.IList httpMethods, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDelete(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDelete(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPost(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPost(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPut(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPut(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapVerbs(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, System.Collections.Generic.IList httpMethods, params object[] metadata) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapVerbs(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string displayName, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, System.Collections.Generic.IList httpMethods, params object[] metadata) { throw null; } } public static partial class EndpointRoutingApplicationBuilderExtensions { @@ -27,8 +27,8 @@ namespace Microsoft.AspNetCore.Builder } public static partial class FallbackEndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) { throw null; } } public static partial class MapRouteRouteBuilderExtensions { diff --git a/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs b/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs index e3df5c72b6..716be5af9f 100644 --- a/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs +++ b/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs @@ -26,179 +26,179 @@ namespace Microsoft.AspNetCore.Builder /// Adds a to the that matches HTTP GET requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapGet( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName: null, requestDelegate, GetVerb, metadata); + return MapVerbs(routes, pattern, displayName: null, requestDelegate, GetVerb, metadata); } /// /// Adds a to the that matches HTTP GET requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapGet( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName, requestDelegate, GetVerb, metadata); + return MapVerbs(routes, pattern, displayName, requestDelegate, GetVerb, metadata); } /// /// Adds a to the that matches HTTP POST requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapPost( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName: null, requestDelegate, PostVerb, metadata); + return MapVerbs(routes, pattern, displayName: null, requestDelegate, PostVerb, metadata); } /// /// Adds a to the that matches HTTP POST requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapPost( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName, requestDelegate, PostVerb, metadata); + return MapVerbs(routes, pattern, displayName, requestDelegate, PostVerb, metadata); } /// /// Adds a to the that matches HTTP PUT requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapPut( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName: null, requestDelegate, PutVerb, metadata); + return MapVerbs(routes, pattern, displayName: null, requestDelegate, PutVerb, metadata); } /// /// Adds a to the that matches HTTP PUT requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapPut( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName, requestDelegate, PutVerb, metadata); + return MapVerbs(routes, pattern, displayName, requestDelegate, PutVerb, metadata); } /// /// Adds a to the that matches HTTP DELETE requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapDelete( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName: null, requestDelegate, DeleteVerb, metadata); + return MapVerbs(routes, pattern, displayName: null, requestDelegate, DeleteVerb, metadata); } /// /// Adds a to the that matches HTTP DELETE requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapDelete( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - return MapVerbs(builder, pattern, displayName, requestDelegate, DeleteVerb, metadata); + return MapVerbs(routes, pattern, displayName, requestDelegate, DeleteVerb, metadata); } /// /// Adds a to the that matches HTTP requests /// for the specified HTTP methods and pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// HTTP methods that the endpoint will match. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapVerbs( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, IList httpMethods, params object[] metadata) { - return MapVerbs(builder, pattern, displayName: null, requestDelegate, httpMethods, metadata); + return MapVerbs(routes, pattern, displayName: null, requestDelegate, httpMethods, metadata); } /// /// Adds a to the that matches HTTP requests /// for the specified HTTP methods and pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. @@ -206,7 +206,7 @@ namespace Microsoft.AspNetCore.Builder /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder MapVerbs( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, @@ -225,85 +225,85 @@ namespace Microsoft.AspNetCore.Builder resolvedMetadata.AddRange(metadata); } - return Map(builder, pattern, displayName ?? $"{pattern} HTTP: {string.Join(", ", httpMethods)}", requestDelegate, metadata: resolvedMetadata.ToArray()); + return Map(routes, pattern, displayName ?? $"{pattern} HTTP: {string.Join(", ", httpMethods)}", requestDelegate, metadata: resolvedMetadata.ToArray()); } /// /// Adds a to the that matches HTTP requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder Map( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate, params object[] metadata) { - return Map(builder, RoutePatternFactory.Parse(pattern), pattern, requestDelegate, metadata); + return Map(routes, RoutePatternFactory.Parse(pattern), pattern, requestDelegate, metadata); } /// /// Adds a to the that matches HTTP requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder Map( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - return Map(builder, RoutePatternFactory.Parse(pattern), displayName, requestDelegate, metadata); + return Map(routes, RoutePatternFactory.Parse(pattern), displayName, requestDelegate, metadata); } /// /// Adds a to the that matches HTTP requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder Map( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, RoutePattern pattern, RequestDelegate requestDelegate, params object[] metadata) { - return Map(builder, pattern, pattern.RawText ?? pattern.DebuggerToString(), requestDelegate, metadata); + return Map(routes, pattern, pattern.RawText ?? pattern.DebuggerToString(), requestDelegate, metadata); } /// /// Adds a to the that matches HTTP requests /// for the specified pattern. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The display name for the endpoint. /// The delegate executed when the endpoint is matched. /// Metadata that is added to the endpoint. /// A that can be used to further customize the endpoint. public static IEndpointConventionBuilder Map( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, RoutePattern pattern, string displayName, RequestDelegate requestDelegate, params object[] metadata) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (pattern == null) @@ -346,12 +346,12 @@ namespace Microsoft.AspNetCore.Builder } } - var modelEndpointDataSource = builder.DataSources.OfType().FirstOrDefault(); + var modelEndpointDataSource = routes.DataSources.OfType().FirstOrDefault(); if (modelEndpointDataSource == null) { modelEndpointDataSource = new ModelEndpointDataSource(); - builder.DataSources.Add(modelEndpointDataSource); + routes.DataSources.Add(modelEndpointDataSource); } return modelEndpointDataSource.AddEndpointBuilder(routeEndpointBuilder); diff --git a/src/Http/Routing/src/Builder/FallbackEndpointRouteBuilderExtensions.cs b/src/Http/Routing/src/Builder/FallbackEndpointRouteBuilderExtensions.cs index 1d7190f1da..561f8f6608 100644 --- a/src/Http/Routing/src/Builder/FallbackEndpointRouteBuilderExtensions.cs +++ b/src/Http/Routing/src/Builder/FallbackEndpointRouteBuilderExtensions.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Builder /// Adds a specialized to the that will match /// requests for non-file-names with the lowest possible priority. /// - /// The to add the route to. + /// The to add the route to. /// The delegate executed when the endpoint is matched. /// A that can be used to further customize the endpoint. /// @@ -31,11 +31,11 @@ namespace Microsoft.AspNetCore.Builder /// {*path:nonfile}. The order of the registered endpoint will be int.MaxValue. /// /// - public static IEndpointConventionBuilder MapFallback(this IEndpointRouteBuilder builder, RequestDelegate requestDelegate) + public static IEndpointConventionBuilder MapFallback(this IEndpointRouteBuilder routes, RequestDelegate requestDelegate) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (requestDelegate == null) @@ -43,14 +43,14 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(requestDelegate)); } - return builder.MapFallback("{*path:nonfile}", requestDelegate); + return routes.MapFallback("{*path:nonfile}", requestDelegate); } /// /// Adds a specialized to the that will match /// the provided pattern with the lowest possible priority. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// The delegate executed when the endpoint is matched. /// A that can be used to further customize the endpoint. @@ -68,13 +68,13 @@ namespace Microsoft.AspNetCore.Builder /// /// public static IEndpointConventionBuilder MapFallback( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, RequestDelegate requestDelegate) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (pattern == null) @@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(requestDelegate)); } - var conventionBuilder = builder.Map(pattern, "Fallback " + pattern, requestDelegate); + var conventionBuilder = routes.Map(pattern, "Fallback " + pattern, requestDelegate); conventionBuilder.Add(b => ((RouteEndpointBuilder)b).Order = int.MaxValue); return conventionBuilder; } diff --git a/src/Http/Routing/test/testassets/RoutingSandbox/Framework/FrameworkEndpointRouteBuilderExtensions.cs b/src/Http/Routing/test/testassets/RoutingSandbox/Framework/FrameworkEndpointRouteBuilderExtensions.cs index 68233db388..1bfcc445e8 100644 --- a/src/Http/Routing/test/testassets/RoutingSandbox/Framework/FrameworkEndpointRouteBuilderExtensions.cs +++ b/src/Http/Routing/test/testassets/RoutingSandbox/Framework/FrameworkEndpointRouteBuilderExtensions.cs @@ -15,23 +15,23 @@ namespace RoutingSandbox.Framework { public static class FrameworkEndpointRouteBuilderExtensions { - public static IEndpointConventionBuilder MapFramework(this IEndpointRouteBuilder builder, Action configure) + public static IEndpointConventionBuilder MapFramework(this IEndpointRouteBuilder routes, Action configure) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (configure == null) { throw new ArgumentNullException(nameof(configure)); } - var dataSource = builder.ServiceProvider.GetRequiredService(); + var dataSource = routes.ServiceProvider.GetRequiredService(); var configurationBuilder = new FrameworkConfigurationBuilder(dataSource); configure(configurationBuilder); - builder.DataSources.Add(dataSource); + routes.DataSources.Add(dataSource); return dataSource; } diff --git a/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs b/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs index c6c74075bd..14ca404a34 100644 --- a/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs +++ b/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs @@ -13,18 +13,18 @@ namespace Microsoft.AspNetCore.Builder { public static class EndpointRouteBuilderExtensions { - public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder builder, string template, string greeter) + public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder routes, string template, string greeter) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } - var pipeline = builder.CreateApplicationBuilder() + var pipeline = routes.CreateApplicationBuilder() .UseHello(greeter) .Build(); - return builder.Map( + return routes.Map( template, "Hello " + greeter, pipeline); diff --git a/src/Http/Routing/test/testassets/RoutingWebSite/HelloExtension/EndpointRouteBuilderExtensions.cs b/src/Http/Routing/test/testassets/RoutingWebSite/HelloExtension/EndpointRouteBuilderExtensions.cs index c6c74075bd..14ca404a34 100644 --- a/src/Http/Routing/test/testassets/RoutingWebSite/HelloExtension/EndpointRouteBuilderExtensions.cs +++ b/src/Http/Routing/test/testassets/RoutingWebSite/HelloExtension/EndpointRouteBuilderExtensions.cs @@ -13,18 +13,18 @@ namespace Microsoft.AspNetCore.Builder { public static class EndpointRouteBuilderExtensions { - public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder builder, string template, string greeter) + public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder routes, string template, string greeter) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } - var pipeline = builder.CreateApplicationBuilder() + var pipeline = routes.CreateApplicationBuilder() .UseHello(greeter) .Build(); - return builder.Map( + return routes.Map( template, "Hello " + greeter, pipeline); diff --git a/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs b/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs index ef9b87f063..f3bf04f828 100644 --- a/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs +++ b/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs @@ -14,9 +14,9 @@ namespace Microsoft.AspNetCore.Builder } public static partial class HealthCheckEndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options, string displayName) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options, string displayName) { throw null; } } } namespace Microsoft.AspNetCore.Diagnostics.HealthChecks diff --git a/src/Middleware/HealthChecks/src/Builder/HealthCheckEndpointRouteBuilderExtensions.cs b/src/Middleware/HealthChecks/src/Builder/HealthCheckEndpointRouteBuilderExtensions.cs index 5f44fcaf77..599362f9c4 100644 --- a/src/Middleware/HealthChecks/src/Builder/HealthCheckEndpointRouteBuilderExtensions.cs +++ b/src/Middleware/HealthChecks/src/Builder/HealthCheckEndpointRouteBuilderExtensions.cs @@ -21,36 +21,36 @@ namespace Microsoft.AspNetCore.Builder /// /// Adds a health checks endpoint to the with the specified template. /// - /// The to add the health checks endpoint to. + /// The to add the health checks endpoint to. /// The URL pattern of the health checks endpoint. - /// A convention builder for the health checks endpoint. + /// A convention routes for the health checks endpoint. public static IEndpointConventionBuilder MapHealthChecks( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } - return MapHealthChecksCore(builder, pattern, null, DefaultDisplayName); + return MapHealthChecksCore(routes, pattern, null, DefaultDisplayName); } /// /// Adds a health checks endpoint to the with the specified template and options. /// - /// The to add the health checks endpoint to. + /// The to add the health checks endpoint to. /// The URL pattern of the health checks endpoint. /// A used to configure the health checks. - /// A convention builder for the health checks endpoint. + /// A convention routes for the health checks endpoint. public static IEndpointConventionBuilder MapHealthChecks( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, HealthCheckOptions options) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (options == null) @@ -58,26 +58,26 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(options)); } - return MapHealthChecksCore(builder, pattern, options, DefaultDisplayName); + return MapHealthChecksCore(routes, pattern, options, DefaultDisplayName); } /// /// Adds a health checks endpoint to the with the specified template, options and display name. /// - /// The to add the health checks endpoint to. + /// The to add the health checks endpoint to. /// The URL pattern of the health checks endpoint. /// A used to configure the health checks. /// The display name for the endpoint. - /// A convention builder for the health checks endpoint. + /// A convention routes for the health checks endpoint. public static IEndpointConventionBuilder MapHealthChecks( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, HealthCheckOptions options, string displayName) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (options == null) @@ -90,12 +90,12 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentException("A valid non-empty display name must be provided.", nameof(displayName)); } - return MapHealthChecksCore(builder, pattern, options, displayName); + return MapHealthChecksCore(routes, pattern, options, displayName); } - private static IEndpointConventionBuilder MapHealthChecksCore(IEndpointRouteBuilder builder, string pattern, HealthCheckOptions options, string displayName) + private static IEndpointConventionBuilder MapHealthChecksCore(IEndpointRouteBuilder routes, string pattern, HealthCheckOptions options, string displayName) { - if (builder.ServiceProvider.GetService(typeof(HealthCheckService)) == null) + if (routes.ServiceProvider.GetService(typeof(HealthCheckService)) == null) { throw new InvalidOperationException(Resources.FormatUnableToFindServices( nameof(IServiceCollection), @@ -105,11 +105,11 @@ namespace Microsoft.AspNetCore.Builder var args = options != null ? new[] { Options.Create(options) } : Array.Empty(); - var pipeline = builder.CreateApplicationBuilder() + var pipeline = routes.CreateApplicationBuilder() .UseMiddleware(args) .Build(); - return builder.Map(pattern, displayName, pipeline); + return routes.Map(pattern, displayName, pipeline); } } } diff --git a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs index 76cc1985ba..abeeb6504f 100644 --- a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs +++ b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs @@ -61,10 +61,10 @@ namespace Microsoft.AspNetCore.Builder } public static partial class StaticFilesEndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string filePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string filePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string filePath) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string filePath) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) { throw null; } } } namespace Microsoft.AspNetCore.StaticFiles diff --git a/src/Middleware/StaticFiles/src/StaticFilesEndpointRouteBuilderExtensions.cs b/src/Middleware/StaticFiles/src/StaticFilesEndpointRouteBuilderExtensions.cs index 73c32b5467..d34e54e959 100644 --- a/src/Middleware/StaticFiles/src/StaticFilesEndpointRouteBuilderExtensions.cs +++ b/src/Middleware/StaticFiles/src/StaticFilesEndpointRouteBuilderExtensions.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Builder /// requests for non-filenames with the lowest possible priority. The request will be routed to a /// that attempts to serve the file specified by . /// - /// The . + /// The . /// The file path of the file to serve. /// The /// @@ -38,12 +38,12 @@ namespace Microsoft.AspNetCore.Builder /// /// public static IEndpointConventionBuilder MapFallbackToFile( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string filePath) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (filePath == null) @@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(filePath)); } - return builder.MapFallback(CreateRequestDelegate(builder, filePath)); + return routes.MapFallback(CreateRequestDelegate(routes, filePath)); } /// @@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Builder /// requests for non-filenames with the lowest possible priority. The request will be routed to a /// that attempts to serve the file specified by . /// - /// The . + /// The . /// The file path of the file to serve. /// for the . /// The @@ -76,13 +76,13 @@ namespace Microsoft.AspNetCore.Builder /// /// public static IEndpointConventionBuilder MapFallbackToFile( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string filePath, StaticFileOptions options) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (filePath == null) @@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(filePath)); } - return builder.MapFallback(CreateRequestDelegate(builder, filePath, options)); + return routes.MapFallback(CreateRequestDelegate(routes, filePath, options)); } /// @@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Builder /// requests for non-filenames with the lowest possible priority. The request will be routed to a /// that attempts to serve the file specified by . /// - /// The . + /// The . /// The route pattern. /// The file path of the file to serve. /// The @@ -121,13 +121,13 @@ namespace Microsoft.AspNetCore.Builder /// /// public static IEndpointConventionBuilder MapFallbackToFile( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string filePath) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (pattern == null) @@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(filePath)); } - return builder.MapFallback(pattern, CreateRequestDelegate(builder, filePath)); + return routes.MapFallback(pattern, CreateRequestDelegate(routes, filePath)); } /// @@ -148,7 +148,7 @@ namespace Microsoft.AspNetCore.Builder /// requests for non-filenames with the lowest possible priority. The request will be routed to a /// that attempts to serve the file specified by . /// - /// The .\ + /// The .\ /// The route pattern. /// The file path of the file to serve. /// for the . @@ -169,14 +169,14 @@ namespace Microsoft.AspNetCore.Builder /// /// public static IEndpointConventionBuilder MapFallbackToFile( - this IEndpointRouteBuilder builder, + this IEndpointRouteBuilder routes, string pattern, string filePath, StaticFileOptions options) { - if (builder == null) + if (routes == null) { - throw new ArgumentNullException(nameof(builder)); + throw new ArgumentNullException(nameof(routes)); } if (pattern == null) @@ -189,15 +189,15 @@ namespace Microsoft.AspNetCore.Builder throw new ArgumentNullException(nameof(filePath)); } - return builder.MapFallback(pattern, CreateRequestDelegate(builder, filePath, options)); + return routes.MapFallback(pattern, CreateRequestDelegate(routes, filePath, options)); } private static RequestDelegate CreateRequestDelegate( - IEndpointRouteBuilder builder, + IEndpointRouteBuilder routes, string filePath, StaticFileOptions options = null) { - var app = builder.CreateApplicationBuilder(); + var app = routes.CreateApplicationBuilder(); app.Use(next => context => { context.Request.Path = "/" + filePath; diff --git a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs index c19fe4e234..5cb7488011 100644 --- a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs +++ b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs @@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Builder { public static partial class ControllerEndpointRouteBuilderExtensions { - public static void MapAreaControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string name, string areaName, string template, object defaults = null, object constraints = null, object dataTokens = null) { } - public static void MapControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string name, string template, object defaults = null, object constraints = null, object dataTokens = null) { } + public static void MapAreaControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string name, string areaName, string pattern, object defaults = null, object constraints = null, object dataTokens = null) { } + public static void MapControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string name, string pattern, object defaults = null, object constraints = null, object dataTokens = null) { } public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapControllers(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes) { throw null; } public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDefaultControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes) { throw null; } public static void MapFallbackToAreaController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string action, string controller, string area) { } diff --git a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs index dc2d3b7d8c..3736fe523c 100644 --- a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs +++ b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs @@ -5,10 +5,10 @@ namespace Microsoft.AspNetCore.Builder { public static partial class ConnectionEndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action configureOptions) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions options, System.Action configure) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action configure) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action configureOptions) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions options, System.Action configure) { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action configure) { throw null; } } public static partial class ConnectionsAppBuilderExtensions { diff --git a/src/SignalR/common/Http.Connections/src/ConnectionEndpointRouteBuilderExtensions.cs b/src/SignalR/common/Http.Connections/src/ConnectionEndpointRouteBuilderExtensions.cs index 4f721adaf8..06af119fad 100644 --- a/src/SignalR/common/Http.Connections/src/ConnectionEndpointRouteBuilderExtensions.cs +++ b/src/SignalR/common/Http.Connections/src/ConnectionEndpointRouteBuilderExtensions.cs @@ -18,34 +18,34 @@ namespace Microsoft.AspNetCore.Builder /// /// Maps incoming requests with the specified path to the provided connection pipeline. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// A callback to configure the connection. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder builder, string pattern, Action configure) => - builder.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure); + public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder routes, string pattern, Action configure) => + routes.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure); /// /// Maps incoming requests with the specified path to the provided connection pipeline. /// /// The type. - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapConnectionHandler(this IEndpointRouteBuilder builder, string pattern) where TConnectionHandler : ConnectionHandler + public static IEndpointConventionBuilder MapConnectionHandler(this IEndpointRouteBuilder routes, string pattern) where TConnectionHandler : ConnectionHandler { - return builder.MapConnectionHandler(pattern, configureOptions: null); + return routes.MapConnectionHandler(pattern, configureOptions: null); } /// /// Maps incoming requests with the specified path to the provided connection pipeline. /// /// The type. - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// A callback to configure dispatcher options. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapConnectionHandler(this IEndpointRouteBuilder builder, string pattern, Action configureOptions) where TConnectionHandler : ConnectionHandler + public static IEndpointConventionBuilder MapConnectionHandler(this IEndpointRouteBuilder routes, string pattern, Action configureOptions) where TConnectionHandler : ConnectionHandler { var options = new HttpConnectionDispatcherOptions(); // REVIEW: WE should consider removing this and instead just relying on the @@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Builder } configureOptions?.Invoke(options); - var conventionBuilder = builder.MapConnections(pattern, options, b => + var conventionBuilder = routes.MapConnections(pattern, options, b => { b.UseConnectionHandler(); }); @@ -79,16 +79,16 @@ namespace Microsoft.AspNetCore.Builder /// /// Maps incoming requests with the specified path to the provided connection pipeline. /// - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// Options used to configure the connection. /// A callback to configure the connection. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder builder, string pattern, HttpConnectionDispatcherOptions options, Action configure) + public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder routes, string pattern, HttpConnectionDispatcherOptions options, Action configure) { - var dispatcher = builder.ServiceProvider.GetRequiredService(); + var dispatcher = routes.ServiceProvider.GetRequiredService(); - var connectionBuilder = new ConnectionBuilder(builder.ServiceProvider); + var connectionBuilder = new ConnectionBuilder(routes.ServiceProvider); configure(connectionBuilder); var connectionDelegate = connectionBuilder.Build(); @@ -98,21 +98,21 @@ namespace Microsoft.AspNetCore.Builder var conventionBuilders = new List(); // Build the negotiate application - var app = builder.CreateApplicationBuilder(); + var app = routes.CreateApplicationBuilder(); app.UseWebSockets(); app.Run(c => dispatcher.ExecuteNegotiateAsync(c, options)); var negotiateHandler = app.Build(); - var negotiateBuilder = builder.Map(pattern + "/negotiate", negotiateHandler); + var negotiateBuilder = routes.Map(pattern + "/negotiate", negotiateHandler); conventionBuilders.Add(negotiateBuilder); // build the execute handler part of the protocol - app = builder.CreateApplicationBuilder(); + app = routes.CreateApplicationBuilder(); app.UseWebSockets(); app.Run(c => dispatcher.ExecuteAsync(c, options, connectionDelegate)); var executehandler = app.Build(); - var executeBuilder = builder.Map(pattern, executehandler); + var executeBuilder = routes.Map(pattern, executehandler); conventionBuilders.Add(executeBuilder); var compositeConventionBuilder = new CompositeEndpointConventionBuilder(conventionBuilders); diff --git a/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs b/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs index 2d8ffaedb9..fc4907a263 100644 --- a/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs +++ b/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs @@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Builder { public static partial class HubEndpointRouteBuilderExtensions { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; } + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; } } public static partial class SignalRAppBuilderExtensions { diff --git a/src/SignalR/server/SignalR/src/HubEndpointRouteBuilderExtensions.cs b/src/SignalR/server/SignalR/src/HubEndpointRouteBuilderExtensions.cs index 7f4a1be408..fd392179d1 100644 --- a/src/SignalR/server/SignalR/src/HubEndpointRouteBuilderExtensions.cs +++ b/src/SignalR/server/SignalR/src/HubEndpointRouteBuilderExtensions.cs @@ -17,25 +17,25 @@ namespace Microsoft.AspNetCore.Builder /// Maps incoming requests with the specified path to the specified type. /// /// The type to map requests to. - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapHub(this IEndpointRouteBuilder builder, string pattern) where THub : Hub + public static IEndpointConventionBuilder MapHub(this IEndpointRouteBuilder routes, string pattern) where THub : Hub { - return builder.MapHub(pattern, configureOptions: null); + return routes.MapHub(pattern, configureOptions: null); } /// /// Maps incoming requests with the specified path to the specified type. /// /// The type to map requests to. - /// The to add the route to. + /// The to add the route to. /// The route pattern. /// A callback to configure dispatcher options. /// An for endpoints associated with the connections. - public static IEndpointConventionBuilder MapHub(this IEndpointRouteBuilder builder, string pattern, Action configureOptions) where THub : Hub + public static IEndpointConventionBuilder MapHub(this IEndpointRouteBuilder routes, string pattern, Action configureOptions) where THub : Hub { - var marker = builder.ServiceProvider.GetService(); + var marker = routes.ServiceProvider.GetService(); if (marker == null) { @@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Builder configureOptions?.Invoke(options); - var conventionBuilder = builder.MapConnections(pattern, options, b => + var conventionBuilder = routes.MapConnections(pattern, options, b => { b.UseHub(); });