|
|
@@ -35,7 +35,7 @@ public static class ConnectionEndpointRouteBuilderExtensions
|
|
|
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
|
|
|
/// <param name="pattern">The route pattern.</param>
|
|
|
/// <returns>An <see cref="ConnectionEndpointRouteBuilder"/> for endpoints associated with the connections.</returns>
|
|
|
- public static ConnectionEndpointRouteBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern) where TConnectionHandler : ConnectionHandler
|
|
|
+ public static ConnectionEndpointRouteBuilder MapConnectionHandler<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConnectionHandler>(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern) where TConnectionHandler : ConnectionHandler
|
|
|
{
|
|
|
return endpoints.MapConnectionHandler<TConnectionHandler>(pattern, configureOptions: null);
|
|
|
}
|
|
|
@@ -48,7 +48,7 @@ public static class ConnectionEndpointRouteBuilderExtensions
|
|
|
/// <param name="pattern">The route pattern.</param>
|
|
|
/// <param name="configureOptions">A callback to configure dispatcher options.</param>
|
|
|
/// <returns>An <see cref="ConnectionEndpointRouteBuilder"/> for endpoints associated with the connections.</returns>
|
|
|
- public static ConnectionEndpointRouteBuilder MapConnectionHandler<TConnectionHandler>(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern, Action<HttpConnectionDispatcherOptions>? configureOptions) where TConnectionHandler : ConnectionHandler
|
|
|
+ public static ConnectionEndpointRouteBuilder MapConnectionHandler<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConnectionHandler>(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern, Action<HttpConnectionDispatcherOptions>? configureOptions) where TConnectionHandler : ConnectionHandler
|
|
|
{
|
|
|
var options = new HttpConnectionDispatcherOptions();
|
|
|
configureOptions?.Invoke(options);
|