Show / Hide Table of Contents

Class ServerSentEventsMiddleware<TServerSentEventsService>

Middleware which provides support for Server-Sent Events protocol. The type of ServerSentEventsService which will be used by the middleware instance.

Inheritance
object
ServerSentEventsMiddleware<TServerSentEventsService>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Lib.AspNetCore.ServerSentEvents
Assembly: Lib.AspNetCore.ServerSentEvents.dll
Syntax
public class ServerSentEventsMiddleware<TServerSentEventsService> where TServerSentEventsService : ServerSentEventsService
Type Parameters
Name Description
TServerSentEventsService

Constructors

ServerSentEventsMiddleware(RequestDelegate, IAuthorizationPolicyProvider, IServerSentEventsClientIdProvider, IServerSentEventsNoReconnectClientsIdsStore, TServerSentEventsService, IOptions<ServerSentEventsOptions>, ILoggerFactory)

Initializes new instance of middleware.

Declaration
public ServerSentEventsMiddleware(RequestDelegate next, IAuthorizationPolicyProvider policyProvider, IServerSentEventsClientIdProvider serverSentEventsClientIdProvider, IServerSentEventsNoReconnectClientsIdsStore serverSentEventsNoReconnectClientsIdsStore, TServerSentEventsService serverSentEventsService, IOptions<ServerSentEventsOptions> serverSentEventsOptions, ILoggerFactory loggerFactory)
Parameters
Type Name Description
RequestDelegate next

The next delegate in the pipeline.

IAuthorizationPolicyProvider policyProvider

The service which can provide an AuthorizationPolicy.

IServerSentEventsClientIdProvider serverSentEventsClientIdProvider

The provider of identifiers for IServerSentEventsClient instances.

IServerSentEventsNoReconnectClientsIdsStore serverSentEventsNoReconnectClientsIdsStore

The store which keeps identifiers of IServerSentEventsClient which shouldn't be allowed to reconnect.

TServerSentEventsService serverSentEventsService

The service which provides operations over Server-Sent Events protocol.

IOptions<ServerSentEventsOptions> serverSentEventsOptions
ILoggerFactory loggerFactory

The logger factory.

Methods

Invoke(HttpContext, IPolicyEvaluator)

Process an individual request.

Declaration
public Task Invoke(HttpContext context, IPolicyEvaluator policyEvaluator)
Parameters
Type Name Description
HttpContext context

The context.

IPolicyEvaluator policyEvaluator

The service which can evaluate an AuthorizationPolicy.

Returns
Type Description
Task

The task object representing the asynchronous operation.

Back to top Copyright © 2017 - 2025 Tomasz Pęczek