Class ServerSentEventsEndpointRouteBuilderExtensions
Provides extension methods for Microsoft.AspNetCore.Routing.IEndpointRouteBuilder to add Server-Sent Events.
Inheritance
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 Microsoft.AspNetCore.Routing.IEndpointRouteBuilder with the specified template.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents(this IEndpointRouteBuilder endpoints, string pattern)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | endpoints | The Microsoft.AspNetCore.Routing.IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
System.String | pattern | The URL pattern of the Server-Sent Events endpoint. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
MapServerSentEvents(IEndpointRouteBuilder, String, ServerSentEventsOptions)
Adds a Server-Sent Events endpoint to the Microsoft.AspNetCore.Routing.IEndpointRouteBuilder with the specified template and options.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents(this IEndpointRouteBuilder endpoints, string pattern, ServerSentEventsOptions options)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | endpoints | The Microsoft.AspNetCore.Routing.IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
System.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 |
---|---|
Microsoft.AspNetCore.Builder.IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
MapServerSentEvents<TServerSentEventsService>(IEndpointRouteBuilder, String)
Adds a Server-Sent Events endpoint to the Microsoft.AspNetCore.Routing.IEndpointRouteBuilder with the specified template.
Declaration
public static IEndpointConventionBuilder MapServerSentEvents<TServerSentEventsService>(this IEndpointRouteBuilder endpoints, string pattern)
where TServerSentEventsService : ServerSentEventsService
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | endpoints | The Microsoft.AspNetCore.Routing.IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
System.String | pattern | The URL pattern of the Server-Sent Events endpoint. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.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 Microsoft.AspNetCore.Routing.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 |
---|---|---|
Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | endpoints | The Microsoft.AspNetCore.Routing.IEndpointRouteBuilder to add the Server-Sent Events endpoint to. |
System.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 |
---|---|
Microsoft.AspNetCore.Builder.IEndpointConventionBuilder | A convention routes for the Server-Sent Events endpoint. |
Type Parameters
Name | Description |
---|---|
TServerSentEventsService | The type of custom ServerSentEventsService. |