Sdílet prostřednictvím


HostingHostBuilderExtensions.ConfigureServices Metoda

Definice

Přidá do kontejneru služby. Tuto možnost lze volat vícekrát a výsledky budou sčítat.

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

Parametry

hostBuilder
IHostBuilder

Nakonfigurujete IHostBuilder .

configureDelegate
Action<IServiceCollection>

Delegát pro konfiguraci .IServiceCollection

Návraty

Stejná instance IHostBuilder pro řetězení.

Platí pro