Class ServerSentEventsEndpointRouteBuilderExtensions
Provides extension methods for IEndpointRouteBuilder to add Server-Sent Events.
Inherited Members
Namespace: Lib.AspNetCore.ServerSentEvents
Assembly: Lib.AspNetCore.ServerSentEvents.dll
Syntax
public static class ServerSentEventsEndpointRouteBuilderExtensions
Methods
MapServerSentEvents(IEndpointRouteBuilder, string)
Adds a Server-Sent Events endpoint to the IEndpointRouteBuilder with the specified template.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents(this IEndpointRouteBuilder endpoints, string pattern)
Parameters
| Type | Name | Description |
|---|---|---|
| IEndpointRouteBuilder | endpoints | The IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
| string | pattern | The URL pattern of the Server-Sent Events endpoint. |
Returns
| Type | Description |
|---|---|
| IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
MapServerSentEvents(IEndpointRouteBuilder, string, ServerSentEventsOptions)
Adds a Server-Sent Events endpoint to the IEndpointRouteBuilder with the specified template and options.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents(this IEndpointRouteBuilder endpoints, string pattern, ServerSentEventsOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| IEndpointRouteBuilder | endpoints | The IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
| string | pattern | The URL pattern of the Server-Sent Events endpoint. |
| ServerSentEventsOptions | options | A ServerSentEventsOptions used to configure the Server-Sent Events. |
Returns
| Type | Description |
|---|---|
| IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
MapServerSentEvents<TServerSentEventsService>(IEndpointRouteBuilder, string)
Adds a Server-Sent Events endpoint to the IEndpointRouteBuilder with the specified template.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents<TServerSentEventsService>(this IEndpointRouteBuilder endpoints, string pattern) where TServerSentEventsService : ServerSentEventsService
Parameters
| Type | Name | Description |
|---|---|---|
| IEndpointRouteBuilder | endpoints | The IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
| string | pattern | The URL pattern of the Server-Sent Events endpoint. |
Returns
| Type | Description |
|---|---|
| IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
Type Parameters
| Name | Description |
|---|---|
| TServerSentEventsService | The type of custom ServerSentEventsService. |
MapServerSentEvents<TServerSentEventsService>(IEndpointRouteBuilder, string, ServerSentEventsOptions)
Adds a Server-Sent Events endpoint to the IEndpointRouteBuilder with the specified template and options.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents<TServerSentEventsService>(this IEndpointRouteBuilder endpoints, string pattern, ServerSentEventsOptions options) where TServerSentEventsService : ServerSentEventsService
Parameters
| Type | Name | Description |
|---|---|---|
| IEndpointRouteBuilder | endpoints | The IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
| string | pattern | The URL pattern of the Server-Sent Events endpoint. |
| ServerSentEventsOptions | options | A ServerSentEventsOptions used to configure the Server-Sent Events. |
Returns
| Type | Description |
|---|---|
| IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
Type Parameters
| Name | Description |
|---|---|
| TServerSentEventsService | The type of custom ServerSentEventsService. |