Dela via


ConfigureWebHostBuilder.ConfigureServices Method

Definition

Overloads

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

ConfigureServices(Action<IServiceCollection>)

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Source:
ConfigureWebHostBuilder.cs

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureServices : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of WebHostBuilderContext, IServiceCollection)) As IWebHostBuilder

Parameters

configureServices
Action<WebHostBuilderContext,IServiceCollection>

A delegate for configuring the IServiceCollection.

Returns

The IWebHostBuilder.

Implements

Applies to

ConfigureServices(Action<IServiceCollection>)

Source:
ConfigureWebHostBuilder.cs

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of IServiceCollection)) As IWebHostBuilder

Parameters

configureServices
Action<IServiceCollection>

A delegate for configuring the IServiceCollection.

Returns

The IWebHostBuilder.

Implements

Applies to