Make naming of IEndpointRouteBuilderConsistent across usages.
This commit is contained in:
parent
6d1c75c095
commit
e78a6521b9
|
|
@ -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<string> 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<string> 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<string> 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<string> 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,179 +26,179 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified HTTP methods and pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="httpMethods">HTTP methods that the endpoint will match.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
public static IEndpointConventionBuilder MapVerbs(
|
||||
this IEndpointRouteBuilder builder,
|
||||
this IEndpointRouteBuilder routes,
|
||||
string pattern,
|
||||
RequestDelegate requestDelegate,
|
||||
IList<string> httpMethods,
|
||||
params object[] metadata)
|
||||
{
|
||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, httpMethods, metadata);
|
||||
return MapVerbs(routes, pattern, displayName: null, requestDelegate, httpMethods, metadata);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified HTTP methods and pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
|
|
@ -206,7 +206,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||
/// for the specified pattern.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <param name="metadata">Metadata that is added to the endpoint.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
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<ModelEndpointDataSource>().FirstOrDefault();
|
||||
var modelEndpointDataSource = routes.DataSources.OfType<ModelEndpointDataSource>().FirstOrDefault();
|
||||
|
||||
if (modelEndpointDataSource == null)
|
||||
{
|
||||
modelEndpointDataSource = new ModelEndpointDataSource();
|
||||
builder.DataSources.Add(modelEndpointDataSource);
|
||||
routes.DataSources.Add(modelEndpointDataSource);
|
||||
}
|
||||
|
||||
return modelEndpointDataSource.AddEndpointBuilder(routeEndpointBuilder);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
|
||||
/// requests for non-file-names with the lowest possible priority.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
/// <remarks>
|
||||
|
|
@ -31,11 +31,11 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <c>{*path:nonfile}</c>. The order of the registered endpoint will be <c>int.MaxValue</c>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
|
||||
/// the provided pattern with the lowest possible priority.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||
|
|
@ -68,13 +68,13 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,23 +15,23 @@ namespace RoutingSandbox.Framework
|
|||
{
|
||||
public static class FrameworkEndpointRouteBuilderExtensions
|
||||
{
|
||||
public static IEndpointConventionBuilder MapFramework(this IEndpointRouteBuilder builder, Action<FrameworkConfigurationBuilder> configure)
|
||||
public static IEndpointConventionBuilder MapFramework(this IEndpointRouteBuilder routes, Action<FrameworkConfigurationBuilder> 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<FrameworkEndpointDataSource>();
|
||||
var dataSource = routes.ServiceProvider.GetRequiredService<FrameworkEndpointDataSource>();
|
||||
|
||||
var configurationBuilder = new FrameworkConfigurationBuilder(dataSource);
|
||||
configure(configurationBuilder);
|
||||
|
||||
builder.DataSources.Add(dataSource);
|
||||
routes.DataSources.Add(dataSource);
|
||||
|
||||
return dataSource;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -21,36 +21,36 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <summary>
|
||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="pattern">The URL pattern of the health checks endpoint.</param>
|
||||
/// <returns>A convention builder for the health checks endpoint.</returns>
|
||||
/// <returns>A convention routes for the health checks endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template and options.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="pattern">The URL pattern of the health checks endpoint.</param>
|
||||
/// <param name="options">A <see cref="HealthCheckOptions"/> used to configure the health checks.</param>
|
||||
/// <returns>A convention builder for the health checks endpoint.</returns>
|
||||
/// <returns>A convention routes for the health checks endpoint.</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template, options and display name.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
|
||||
/// <param name="pattern">The URL pattern of the health checks endpoint.</param>
|
||||
/// <param name="options">A <see cref="HealthCheckOptions"/> used to configure the health checks.</param>
|
||||
/// <param name="displayName">The display name for the endpoint.</param>
|
||||
/// <returns>A convention builder for the health checks endpoint.</returns>
|
||||
/// <returns>A convention routes for the health checks endpoint.</returns>
|
||||
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<object>();
|
||||
|
||||
var pipeline = builder.CreateApplicationBuilder()
|
||||
var pipeline = routes.CreateApplicationBuilder()
|
||||
.UseMiddleware<HealthCheckMiddleware>(args)
|
||||
.Build();
|
||||
|
||||
return builder.Map(pattern, displayName, pipeline);
|
||||
return routes.Map(pattern, displayName, pipeline);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// requests for non-filenames with the lowest possible priority. The request will be routed to a
|
||||
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="filePath">The file path of the file to serve.</param>
|
||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||
/// <remarks>
|
||||
|
|
@ -38,12 +38,12 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// requests for non-filenames with the lowest possible priority. The request will be routed to a
|
||||
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="filePath">The file path of the file to serve.</param>
|
||||
/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param>
|
||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||
|
|
@ -76,13 +76,13 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// requests for non-filenames with the lowest possible priority. The request will be routed to a
|
||||
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="filePath">The file path of the file to serve.</param>
|
||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||
|
|
@ -121,13 +121,13 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -148,7 +148,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// requests for non-filenames with the lowest possible priority. The request will be routed to a
|
||||
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/>.</param>\
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/>.</param>\
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="filePath">The file path of the file to serve.</param>
|
||||
/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param>
|
||||
|
|
@ -169,14 +169,14 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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) { }
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace Microsoft.AspNetCore.Builder
|
|||
{
|
||||
public static partial class ConnectionEndpointRouteBuilderExtensions
|
||||
{
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> 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<Microsoft.AspNetCore.Connections.IConnectionBuilder> configure) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action<Microsoft.AspNetCore.Connections.IConnectionBuilder> configure) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> 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<Microsoft.AspNetCore.Connections.IConnectionBuilder> configure) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action<Microsoft.AspNetCore.Connections.IConnectionBuilder> configure) { throw null; }
|
||||
}
|
||||
public static partial class ConnectionsAppBuilderExtensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,34 +18,34 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <summary>
|
||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="configure">A callback to configure the connection.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder builder, string pattern, Action<IConnectionBuilder> configure) =>
|
||||
builder.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure);
|
||||
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder routes, string pattern, Action<IConnectionBuilder> configure) =>
|
||||
routes.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure);
|
||||
|
||||
/// <summary>
|
||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||
/// </summary>
|
||||
/// <typeparam name="TConnectionHandler">The <see cref="ConnectionHandler"/> type.</typeparam>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder builder, string pattern) where TConnectionHandler : ConnectionHandler
|
||||
public static IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder routes, string pattern) where TConnectionHandler : ConnectionHandler
|
||||
{
|
||||
return builder.MapConnectionHandler<TConnectionHandler>(pattern, configureOptions: null);
|
||||
return routes.MapConnectionHandler<TConnectionHandler>(pattern, configureOptions: null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||
/// </summary>
|
||||
/// <typeparam name="TConnectionHandler">The <see cref="ConnectionHandler"/> type.</typeparam>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder builder, string pattern, Action<HttpConnectionDispatcherOptions> configureOptions) where TConnectionHandler : ConnectionHandler
|
||||
public static IEndpointConventionBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder routes, string pattern, Action<HttpConnectionDispatcherOptions> 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<TConnectionHandler>();
|
||||
});
|
||||
|
|
@ -79,16 +79,16 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <summary>
|
||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="options">Options used to configure the connection.</param>
|
||||
/// <param name="configure">A callback to configure the connection.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder builder, string pattern, HttpConnectionDispatcherOptions options, Action<IConnectionBuilder> configure)
|
||||
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder routes, string pattern, HttpConnectionDispatcherOptions options, Action<IConnectionBuilder> configure)
|
||||
{
|
||||
var dispatcher = builder.ServiceProvider.GetRequiredService<HttpConnectionDispatcher>();
|
||||
var dispatcher = routes.ServiceProvider.GetRequiredService<HttpConnectionDispatcher>();
|
||||
|
||||
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<IEndpointConventionBuilder>();
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Builder
|
|||
{
|
||||
public static partial class HubEndpointRouteBuilderExtensions
|
||||
{
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub<THub>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub<THub>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, string pattern, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub<THub>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHub<THub>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; }
|
||||
}
|
||||
public static partial class SignalRAppBuilderExtensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,25 +17,25 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// Maps incoming requests with the specified path to the specified <see cref="Hub"/> type.
|
||||
/// </summary>
|
||||
/// <typeparam name="THub">The <see cref="Hub"/> type to map requests to.</typeparam>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapHub<THub>(this IEndpointRouteBuilder builder, string pattern) where THub : Hub
|
||||
public static IEndpointConventionBuilder MapHub<THub>(this IEndpointRouteBuilder routes, string pattern) where THub : Hub
|
||||
{
|
||||
return builder.MapHub<THub>(pattern, configureOptions: null);
|
||||
return routes.MapHub<THub>(pattern, configureOptions: null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Maps incoming requests with the specified path to the specified <see cref="Hub"/> type.
|
||||
/// </summary>
|
||||
/// <typeparam name="THub">The <see cref="Hub"/> type to map requests to.</typeparam>
|
||||
/// <param name="builder">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="routes">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
||||
/// <param name="pattern">The route pattern.</param>
|
||||
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||
public static IEndpointConventionBuilder MapHub<THub>(this IEndpointRouteBuilder builder, string pattern, Action<HttpConnectionDispatcherOptions> configureOptions) where THub : Hub
|
||||
public static IEndpointConventionBuilder MapHub<THub>(this IEndpointRouteBuilder routes, string pattern, Action<HttpConnectionDispatcherOptions> configureOptions) where THub : Hub
|
||||
{
|
||||
var marker = builder.ServiceProvider.GetService<SignalRMarkerService>();
|
||||
var marker = routes.ServiceProvider.GetService<SignalRMarkerService>();
|
||||
|
||||
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<THub>();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue