Method AddHttpSessionHandling
AddHttpSessionHandling<TSessionToken, TSessionData, TSessionStoreContextFactory>(IServiceCollection, Action<SessionHandlingOptions>?)
Registers services required for enabling HTTP session handling.
Declaration
public static IServiceCollection AddHttpSessionHandling<TSessionToken, TSessionData, TSessionStoreContextFactory>(this IServiceCollection services, Action<SessionHandlingOptions>? configure = null) where TSessionToken : class, ISessionToken where TSessionData : class, ISessionData where TSessionStoreContextFactory : class, ISessionStoreContextFactory<TSessionToken, TSessionData>
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection to add session handling services to. |
| Action<SessionHandlingOptions> | configure | An optional action to configure options. |
Returns
| Type | Description |
|---|---|
| IServiceCollection |
Type Parameters
| Name | Description |
|---|---|
| TSessionToken | The session token type. |
| TSessionData | The session storage entry type. |
| TSessionStoreContextFactory | The factory type for creating session store contexts. |