Compartir vía


HostingHostBuilderExtensions.ConfigureServices Método

Definición

Agrega servicios al contenedor. Esto se puede llamar varias veces y los resultados serán acumulables.

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

Parámetros

hostBuilder
IHostBuilder

El objeto IHostBuilder que se va a configurar.

configureDelegate
Action<IServiceCollection>

El delegado para configurar IServiceCollection.

Devoluciones

La misma instancia de IHostBuilder para el encadenamiento.

Se aplica a