Bagikan melalui


SessionServiceCollectionExtensions.AddSession Metode

Definisi

Overload

AddSession(IServiceCollection)

Menambahkan layanan yang diperlukan untuk status sesi aplikasi.

AddSession(IServiceCollection, Action<SessionOptions>)

Menambahkan layanan yang diperlukan untuk status sesi aplikasi.

AddSession(IServiceCollection)

Sumber:
SessionServiceCollectionExtensions.cs
Sumber:
SessionServiceCollectionExtensions.cs
Sumber:
SessionServiceCollectionExtensions.cs

Menambahkan layanan yang diperlukan untuk status sesi aplikasi.

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

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk

AddSession(IServiceCollection, Action<SessionOptions>)

Sumber:
SessionServiceCollectionExtensions.cs
Sumber:
SessionServiceCollectionExtensions.cs
Sumber:
SessionServiceCollectionExtensions.cs

Menambahkan layanan yang diperlukan untuk status sesi aplikasi.

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

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

configure
Action<SessionOptions>

Opsi sesi untuk mengonfigurasi middleware dengan.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk