Partager via


SessionServiceCollectionExtensions.AddSession Méthode

Définition

Surcharges

AddSession(IServiceCollection)

Ajoute les services requis pour l’état de session d’application.

AddSession(IServiceCollection, Action<SessionOptions>)

Ajoute les services requis pour l’état de session d’application.

AddSession(IServiceCollection)

Source:
SessionServiceCollectionExtensions.cs
Source:
SessionServiceCollectionExtensions.cs
Source:
SessionServiceCollectionExtensions.cs

Ajoute les services requis pour l’état de session d’application.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddSession : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddSession (services As IServiceCollection) As IServiceCollection

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à

AddSession(IServiceCollection, Action<SessionOptions>)

Source:
SessionServiceCollectionExtensions.cs
Source:
SessionServiceCollectionExtensions.cs
Source:
SessionServiceCollectionExtensions.cs

Ajoute les services requis pour l’état de session d’application.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Builder.SessionOptions> configure);
static member AddSession : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Builder.SessionOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddSession (services As IServiceCollection, configure As Action(Of SessionOptions)) As IServiceCollection

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

configure
Action<SessionOptions>

Options de session avec laquelle configurer le middleware.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à