Bagikan melalui


IWebHostBuilder.ConfigureServices Metode

Definisi

Overload

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Menambahkan delegasi untuk mengonfigurasi layanan tambahan untuk host atau aplikasi web. Ini mungkin dipanggil beberapa kali.

ConfigureServices(Action<IServiceCollection>)

Menambahkan delegasi untuk mengonfigurasi layanan tambahan untuk host atau aplikasi web. Ini mungkin dipanggil beberapa kali.

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Sumber:
IWebHostBuilder.cs

Menambahkan delegasi untuk mengonfigurasi layanan tambahan untuk host atau aplikasi web. Ini mungkin dipanggil beberapa kali.

public:
 Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureServices(Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureServices);
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
Public Function ConfigureServices (configureServices As Action(Of WebHostBuilderContext, IServiceCollection)) As IWebHostBuilder

Parameter

configureServices
Action<WebHostBuilderContext,IServiceCollection>

Delegasi untuk mengonfigurasi IServiceCollection.

Mengembalikan

IWebHostBuilder.

Berlaku untuk

ConfigureServices(Action<IServiceCollection>)

Sumber:
IWebHostBuilder.cs

Menambahkan delegasi untuk mengonfigurasi layanan tambahan untuk host atau aplikasi web. Ini mungkin dipanggil beberapa kali.

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

Parameter

configureServices
Action<IServiceCollection>

Delegasi untuk mengonfigurasi IServiceCollection.

Mengembalikan

IWebHostBuilder.

Berlaku untuk