Бөлісу құралы:


HostingHostBuilderExtensions.ConfigureServices Метод

Определение

Добавляет службы в контейнер. Может вызываться несколько раз с накоплением результатов.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureServices(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureDelegate);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
static member ConfigureServices : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureServices (hostBuilder As IHostBuilder, configureDelegate As Action(Of IServiceCollection)) As IHostBuilder

Параметры

hostBuilder
IHostBuilder

IHostBuilder для настройки.

configureDelegate
Action<IServiceCollection>

Делегат для настройки IServiceCollection.

Возвращаемое значение

Тот же экземпляр IHostBuilder для построения цепочки.

Применяется к