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 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 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 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 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 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 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 builder, string 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, 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
|
public static partial class EndpointRoutingApplicationBuilderExtensions
|
||||||
{
|
{
|
||||||
|
|
@ -27,8 +27,8 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
}
|
}
|
||||||
public static partial class FallbackEndpointRouteBuilderExtensions
|
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 routes, 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, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) { throw null; }
|
||||||
}
|
}
|
||||||
public static partial class MapRouteRouteBuilderExtensions
|
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
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapGet(
|
public static IEndpointConventionBuilder MapGet(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, GetVerb, metadata);
|
return MapVerbs(routes, pattern, displayName: null, requestDelegate, GetVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapGet(
|
public static IEndpointConventionBuilder MapGet(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName, requestDelegate, GetVerb, metadata);
|
return MapVerbs(routes, pattern, displayName, requestDelegate, GetVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapPost(
|
public static IEndpointConventionBuilder MapPost(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, PostVerb, metadata);
|
return MapVerbs(routes, pattern, displayName: null, requestDelegate, PostVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapPost(
|
public static IEndpointConventionBuilder MapPost(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName, requestDelegate, PostVerb, metadata);
|
return MapVerbs(routes, pattern, displayName, requestDelegate, PostVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapPut(
|
public static IEndpointConventionBuilder MapPut(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, PutVerb, metadata);
|
return MapVerbs(routes, pattern, displayName: null, requestDelegate, PutVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapPut(
|
public static IEndpointConventionBuilder MapPut(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName, requestDelegate, PutVerb, metadata);
|
return MapVerbs(routes, pattern, displayName, requestDelegate, PutVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapDelete(
|
public static IEndpointConventionBuilder MapDelete(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, DeleteVerb, metadata);
|
return MapVerbs(routes, pattern, displayName: null, requestDelegate, DeleteVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapDelete(
|
public static IEndpointConventionBuilder MapDelete(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName, requestDelegate, DeleteVerb, metadata);
|
return MapVerbs(routes, pattern, displayName, requestDelegate, DeleteVerb, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified HTTP methods and pattern.
|
/// for the specified HTTP methods and pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</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="httpMethods">HTTP methods that the endpoint will match.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapVerbs(
|
public static IEndpointConventionBuilder MapVerbs(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
IList<string> httpMethods,
|
IList<string> httpMethods,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return MapVerbs(builder, pattern, displayName: null, requestDelegate, httpMethods, metadata);
|
return MapVerbs(routes, pattern, displayName: null, requestDelegate, httpMethods, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified HTTP methods and pattern.
|
/// for the specified HTTP methods and pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="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>
|
/// <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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder MapVerbs(
|
public static IEndpointConventionBuilder MapVerbs(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
|
|
@ -225,85 +225,85 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
resolvedMetadata.AddRange(metadata);
|
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>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder Map(
|
public static IEndpointConventionBuilder Map(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return Map(builder, RoutePatternFactory.Parse(pattern), pattern, requestDelegate, metadata);
|
return Map(routes, RoutePatternFactory.Parse(pattern), pattern, requestDelegate, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder Map(
|
public static IEndpointConventionBuilder Map(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return Map(builder, RoutePatternFactory.Parse(pattern), displayName, requestDelegate, metadata);
|
return Map(routes, RoutePatternFactory.Parse(pattern), displayName, requestDelegate, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder Map(
|
public static IEndpointConventionBuilder Map(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
RoutePattern pattern,
|
RoutePattern pattern,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
return Map(builder, pattern, pattern.RawText ?? pattern.DebuggerToString(), requestDelegate, metadata);
|
return Map(routes, pattern, pattern.RawText ?? pattern.DebuggerToString(), requestDelegate, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests
|
||||||
/// for the specified pattern.
|
/// for the specified pattern.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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="requestDelegate">The delegate executed when the endpoint is matched.</param>
|
||||||
/// <param name="metadata">Metadata that is added to the endpoint.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
public static IEndpointConventionBuilder Map(
|
public static IEndpointConventionBuilder Map(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
RoutePattern pattern,
|
RoutePattern pattern,
|
||||||
string displayName,
|
string displayName,
|
||||||
RequestDelegate requestDelegate,
|
RequestDelegate requestDelegate,
|
||||||
params object[] metadata)
|
params object[] metadata)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern == null)
|
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)
|
if (modelEndpointDataSource == null)
|
||||||
{
|
{
|
||||||
modelEndpointDataSource = new ModelEndpointDataSource();
|
modelEndpointDataSource = new ModelEndpointDataSource();
|
||||||
builder.DataSources.Add(modelEndpointDataSource);
|
routes.DataSources.Add(modelEndpointDataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
return modelEndpointDataSource.AddEndpointBuilder(routeEndpointBuilder);
|
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
|
/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
|
||||||
/// requests for non-file-names with the lowest possible priority.
|
/// requests for non-file-names with the lowest possible priority.
|
||||||
/// </summary>
|
/// </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>
|
/// <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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
/// <remarks>
|
/// <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>.
|
/// <c>{*path:nonfile}</c>. The order of the registered endpoint will be <c>int.MaxValue</c>.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </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)
|
if (requestDelegate == null)
|
||||||
|
|
@ -43,14 +43,14 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(requestDelegate));
|
throw new ArgumentNullException(nameof(requestDelegate));
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.MapFallback("{*path:nonfile}", requestDelegate);
|
return routes.MapFallback("{*path:nonfile}", requestDelegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
|
/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
|
||||||
/// the provided pattern with the lowest possible priority.
|
/// the provided pattern with the lowest possible priority.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</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>
|
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
|
||||||
|
|
@ -68,13 +68,13 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IEndpointConventionBuilder MapFallback(
|
public static IEndpointConventionBuilder MapFallback(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
RequestDelegate requestDelegate)
|
RequestDelegate requestDelegate)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
|
|
@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(requestDelegate));
|
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);
|
conventionBuilder.Add(b => ((RouteEndpointBuilder)b).Order = int.MaxValue);
|
||||||
return conventionBuilder;
|
return conventionBuilder;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,23 +15,23 @@ namespace RoutingSandbox.Framework
|
||||||
{
|
{
|
||||||
public static class FrameworkEndpointRouteBuilderExtensions
|
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)
|
if (configure == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(configure));
|
throw new ArgumentNullException(nameof(configure));
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataSource = builder.ServiceProvider.GetRequiredService<FrameworkEndpointDataSource>();
|
var dataSource = routes.ServiceProvider.GetRequiredService<FrameworkEndpointDataSource>();
|
||||||
|
|
||||||
var configurationBuilder = new FrameworkConfigurationBuilder(dataSource);
|
var configurationBuilder = new FrameworkConfigurationBuilder(dataSource);
|
||||||
configure(configurationBuilder);
|
configure(configurationBuilder);
|
||||||
|
|
||||||
builder.DataSources.Add(dataSource);
|
routes.DataSources.Add(dataSource);
|
||||||
|
|
||||||
return dataSource;
|
return dataSource;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,18 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
public static class EndpointRouteBuilderExtensions
|
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)
|
.UseHello(greeter)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
return builder.Map(
|
return routes.Map(
|
||||||
template,
|
template,
|
||||||
"Hello " + greeter,
|
"Hello " + greeter,
|
||||||
pipeline);
|
pipeline);
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,18 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
public static class EndpointRouteBuilderExtensions
|
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)
|
.UseHello(greeter)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
return builder.Map(
|
return routes.Map(
|
||||||
template,
|
template,
|
||||||
"Hello " + greeter,
|
"Hello " + greeter,
|
||||||
pipeline);
|
pipeline);
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
}
|
}
|
||||||
public static partial class HealthCheckEndpointRouteBuilderExtensions
|
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 routes, 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 routes, 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, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options, string displayName) { throw null; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace Microsoft.AspNetCore.Diagnostics.HealthChecks
|
namespace Microsoft.AspNetCore.Diagnostics.HealthChecks
|
||||||
|
|
|
||||||
|
|
@ -21,36 +21,36 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template.
|
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template.
|
||||||
/// </summary>
|
/// </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="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(
|
public static IEndpointConventionBuilder MapHealthChecks(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern)
|
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>
|
/// <summary>
|
||||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template and options.
|
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template and options.
|
||||||
/// </summary>
|
/// </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="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="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(
|
public static IEndpointConventionBuilder MapHealthChecks(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
HealthCheckOptions options)
|
HealthCheckOptions options)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options == null)
|
if (options == null)
|
||||||
|
|
@ -58,26 +58,26 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(options));
|
throw new ArgumentNullException(nameof(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
return MapHealthChecksCore(builder, pattern, options, DefaultDisplayName);
|
return MapHealthChecksCore(routes, pattern, options, DefaultDisplayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template, options and display name.
|
/// Adds a health checks endpoint to the <see cref="IEndpointRouteBuilder"/> with the specified template, options and display name.
|
||||||
/// </summary>
|
/// </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="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="options">A <see cref="HealthCheckOptions"/> used to configure the health checks.</param>
|
||||||
/// <param name="displayName">The display name for the endpoint.</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(
|
public static IEndpointConventionBuilder MapHealthChecks(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
HealthCheckOptions options,
|
HealthCheckOptions options,
|
||||||
string displayName)
|
string displayName)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options == null)
|
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));
|
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(
|
throw new InvalidOperationException(Resources.FormatUnableToFindServices(
|
||||||
nameof(IServiceCollection),
|
nameof(IServiceCollection),
|
||||||
|
|
@ -105,11 +105,11 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
||||||
var args = options != null ? new[] { Options.Create(options) } : Array.Empty<object>();
|
var args = options != null ? new[] { Options.Create(options) } : Array.Empty<object>();
|
||||||
|
|
||||||
var pipeline = builder.CreateApplicationBuilder()
|
var pipeline = routes.CreateApplicationBuilder()
|
||||||
.UseMiddleware<HealthCheckMiddleware>(args)
|
.UseMiddleware<HealthCheckMiddleware>(args)
|
||||||
.Build();
|
.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 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 routes, 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 routes, 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 routes, 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 pattern, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) { throw null; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace Microsoft.AspNetCore.StaticFiles
|
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
|
/// 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"/>.
|
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||||
/// </summary>
|
/// </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="filePath">The file path of the file to serve.</param>
|
||||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
|
|
@ -38,12 +38,12 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IEndpointConventionBuilder MapFallbackToFile(
|
public static IEndpointConventionBuilder MapFallbackToFile(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string filePath)
|
string filePath)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filePath == null)
|
if (filePath == null)
|
||||||
|
|
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(filePath));
|
throw new ArgumentNullException(nameof(filePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.MapFallback(CreateRequestDelegate(builder, filePath));
|
return routes.MapFallback(CreateRequestDelegate(routes, filePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// 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"/>.
|
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||||
/// </summary>
|
/// </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="filePath">The file path of the file to serve.</param>
|
||||||
/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param>
|
/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param>
|
||||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||||
|
|
@ -76,13 +76,13 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IEndpointConventionBuilder MapFallbackToFile(
|
public static IEndpointConventionBuilder MapFallbackToFile(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string filePath,
|
string filePath,
|
||||||
StaticFileOptions options)
|
StaticFileOptions options)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filePath == null)
|
if (filePath == null)
|
||||||
|
|
@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(filePath));
|
throw new ArgumentNullException(nameof(filePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.MapFallback(CreateRequestDelegate(builder, filePath, options));
|
return routes.MapFallback(CreateRequestDelegate(routes, filePath, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// 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"/>.
|
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="filePath">The file path of the file to serve.</param>
|
/// <param name="filePath">The file path of the file to serve.</param>
|
||||||
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
/// <returns>The <see cref="IEndpointRouteBuilder"/></returns>
|
||||||
|
|
@ -121,13 +121,13 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IEndpointConventionBuilder MapFallbackToFile(
|
public static IEndpointConventionBuilder MapFallbackToFile(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string filePath)
|
string filePath)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
|
|
@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(filePath));
|
throw new ArgumentNullException(nameof(filePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.MapFallback(pattern, CreateRequestDelegate(builder, filePath));
|
return routes.MapFallback(pattern, CreateRequestDelegate(routes, filePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// 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"/>.
|
/// <see cref="StaticFileMiddleware"/> that attempts to serve the file specified by <paramref name="filePath"/>.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="filePath">The file path of the file to serve.</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>
|
/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param>
|
||||||
|
|
@ -169,14 +169,14 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IEndpointConventionBuilder MapFallbackToFile(
|
public static IEndpointConventionBuilder MapFallbackToFile(
|
||||||
this IEndpointRouteBuilder builder,
|
this IEndpointRouteBuilder routes,
|
||||||
string pattern,
|
string pattern,
|
||||||
string filePath,
|
string filePath,
|
||||||
StaticFileOptions options)
|
StaticFileOptions options)
|
||||||
{
|
{
|
||||||
if (builder == null)
|
if (routes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(builder));
|
throw new ArgumentNullException(nameof(routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
|
|
@ -189,15 +189,15 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
throw new ArgumentNullException(nameof(filePath));
|
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(
|
private static RequestDelegate CreateRequestDelegate(
|
||||||
IEndpointRouteBuilder builder,
|
IEndpointRouteBuilder routes,
|
||||||
string filePath,
|
string filePath,
|
||||||
StaticFileOptions options = null)
|
StaticFileOptions options = null)
|
||||||
{
|
{
|
||||||
var app = builder.CreateApplicationBuilder();
|
var app = routes.CreateApplicationBuilder();
|
||||||
app.Use(next => context =>
|
app.Use(next => context =>
|
||||||
{
|
{
|
||||||
context.Request.Path = "/" + filePath;
|
context.Request.Path = "/" + filePath;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
public static partial class ControllerEndpointRouteBuilderExtensions
|
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 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 template, 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 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 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) { }
|
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 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 routes, 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 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 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 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 builder, string pattern, 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
|
public static partial class ConnectionsAppBuilderExtensions
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,34 +18,34 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="configure">A callback 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>
|
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
||||||
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder builder, string pattern, Action<IConnectionBuilder> configure) =>
|
public static IEndpointConventionBuilder MapConnections(this IEndpointRouteBuilder routes, string pattern, Action<IConnectionBuilder> configure) =>
|
||||||
builder.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure);
|
routes.MapConnections(pattern, new HttpConnectionDispatcherOptions(), configure);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TConnectionHandler">The <see cref="ConnectionHandler"/> type.</typeparam>
|
/// <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="pattern">The route pattern.</param>
|
||||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
/// <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>
|
/// <summary>
|
||||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TConnectionHandler">The <see cref="ConnectionHandler"/> type.</typeparam>
|
/// <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="pattern">The route pattern.</param>
|
||||||
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
||||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
/// <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();
|
var options = new HttpConnectionDispatcherOptions();
|
||||||
// REVIEW: WE should consider removing this and instead just relying on the
|
// REVIEW: WE should consider removing this and instead just relying on the
|
||||||
|
|
@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
}
|
}
|
||||||
configureOptions?.Invoke(options);
|
configureOptions?.Invoke(options);
|
||||||
|
|
||||||
var conventionBuilder = builder.MapConnections(pattern, options, b =>
|
var conventionBuilder = routes.MapConnections(pattern, options, b =>
|
||||||
{
|
{
|
||||||
b.UseConnectionHandler<TConnectionHandler>();
|
b.UseConnectionHandler<TConnectionHandler>();
|
||||||
});
|
});
|
||||||
|
|
@ -79,16 +79,16 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
/// Maps incoming requests with the specified path to the provided connection pipeline.
|
||||||
/// </summary>
|
/// </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="pattern">The route pattern.</param>
|
||||||
/// <param name="options">Options used to configure the connection.</param>
|
/// <param name="options">Options used to configure the connection.</param>
|
||||||
/// <param name="configure">A callback 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>
|
/// <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);
|
configure(connectionBuilder);
|
||||||
var connectionDelegate = connectionBuilder.Build();
|
var connectionDelegate = connectionBuilder.Build();
|
||||||
|
|
||||||
|
|
@ -98,21 +98,21 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
var conventionBuilders = new List<IEndpointConventionBuilder>();
|
var conventionBuilders = new List<IEndpointConventionBuilder>();
|
||||||
|
|
||||||
// Build the negotiate application
|
// Build the negotiate application
|
||||||
var app = builder.CreateApplicationBuilder();
|
var app = routes.CreateApplicationBuilder();
|
||||||
app.UseWebSockets();
|
app.UseWebSockets();
|
||||||
app.Run(c => dispatcher.ExecuteNegotiateAsync(c, options));
|
app.Run(c => dispatcher.ExecuteNegotiateAsync(c, options));
|
||||||
var negotiateHandler = app.Build();
|
var negotiateHandler = app.Build();
|
||||||
|
|
||||||
var negotiateBuilder = builder.Map(pattern + "/negotiate", negotiateHandler);
|
var negotiateBuilder = routes.Map(pattern + "/negotiate", negotiateHandler);
|
||||||
conventionBuilders.Add(negotiateBuilder);
|
conventionBuilders.Add(negotiateBuilder);
|
||||||
|
|
||||||
// build the execute handler part of the protocol
|
// build the execute handler part of the protocol
|
||||||
app = builder.CreateApplicationBuilder();
|
app = routes.CreateApplicationBuilder();
|
||||||
app.UseWebSockets();
|
app.UseWebSockets();
|
||||||
app.Run(c => dispatcher.ExecuteAsync(c, options, connectionDelegate));
|
app.Run(c => dispatcher.ExecuteAsync(c, options, connectionDelegate));
|
||||||
var executehandler = app.Build();
|
var executehandler = app.Build();
|
||||||
|
|
||||||
var executeBuilder = builder.Map(pattern, executehandler);
|
var executeBuilder = routes.Map(pattern, executehandler);
|
||||||
conventionBuilders.Add(executeBuilder);
|
conventionBuilders.Add(executeBuilder);
|
||||||
|
|
||||||
var compositeConventionBuilder = new CompositeEndpointConventionBuilder(conventionBuilders);
|
var compositeConventionBuilder = new CompositeEndpointConventionBuilder(conventionBuilders);
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
public static partial class HubEndpointRouteBuilderExtensions
|
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 routes, 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, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; }
|
||||||
}
|
}
|
||||||
public static partial class SignalRAppBuilderExtensions
|
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.
|
/// Maps incoming requests with the specified path to the specified <see cref="Hub"/> type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="THub">The <see cref="Hub"/> type to map requests to.</typeparam>
|
/// <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="pattern">The route pattern.</param>
|
||||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
/// <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>
|
/// <summary>
|
||||||
/// Maps incoming requests with the specified path to the specified <see cref="Hub"/> type.
|
/// Maps incoming requests with the specified path to the specified <see cref="Hub"/> type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="THub">The <see cref="Hub"/> type to map requests to.</typeparam>
|
/// <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="pattern">The route pattern.</param>
|
||||||
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
||||||
/// <returns>An <see cref="IEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
|
/// <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)
|
if (marker == null)
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
||||||
configureOptions?.Invoke(options);
|
configureOptions?.Invoke(options);
|
||||||
|
|
||||||
var conventionBuilder = builder.MapConnections(pattern, options, b =>
|
var conventionBuilder = routes.MapConnections(pattern, options, b =>
|
||||||
{
|
{
|
||||||
b.UseHub<THub>();
|
b.UseHub<THub>();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue