Method RegisterEndpoints(string, int, IServiceProvider, Action<IEndpointRouteBuilder>, bool, string?, string?)
Maps endpoints of a transport's own onto the listener on host:port, before
or after it started: a SignalR hub, a gRPC service, minimal API handlers. map runs on an
whose is
services, so a framework that takes its pieces from there (MapHub, MapConnections) builds
them from the transport's container and not from the listener's, which this package keeps to itself. Every
request to the endpoints runs in a scope of services (HttpContext.RequestServices).
The endpoints join the running listener through endpoint routing, beside the route table: literal paths of
theirs win over the catch-all of the route table, and the connections the listener already serves are left
alone. Disposing the returned registration removes them the same way. The listener stays up while any route or
registration occupies it.
A registration brings no middleware: the listener's pipeline (trusted proxies, CORS, the caller's principal,
WebSocket upgrades) is fixed when it is built. A gate of the transport's own belongs on its endpoints, as an
endpoint convention inside map.
public EndpointRegistration RegisterEndpoints(string host, int port, IServiceProvider services, Action<IEndpointRouteBuilder> map, bool ssl = false, string? sslCertPath = null, string? sslCertPassword = null)