Condividi tramite


HostingHostBuilderExtensions.ConfigureServices Metodo

Definizione

Aggiunge servizi al contenitore. Può essere chiamato più volte e i risultati vengono aggiunti ai precedenti.

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

Parametri

hostBuilder
IHostBuilder

Oggetto IHostBuilder da configurare.

configureDelegate
Action<IServiceCollection>

Delegato per la configurazione di IServiceCollection.

Restituisce

Stessa istanza di IHostBuilder per il concatenamento.

Si applica a