SessionServiceCollectionExtensions.AddSession SessionServiceCollectionExtensions.AddSession SessionServiceCollectionExtensions.AddSession SessionServiceCollectionExtensions.AddSession Method

Definition

Overloads

AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection)

Adds services required for application session state.

AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>)

Adds services required for application session state.

AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection)

Adds services required for application session state.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddSession(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
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

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add the services to.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>)

Adds services required for application session state.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddSession(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Builder::SessionOptions ^> ^ configure);
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

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add the services to.

configure
Action<SessionOptions>

The session options to configure the middleware with.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

Applies to