HostBuilder.ConfigureServices Metodo

Definizione

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

public:
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureServices(Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureDelegate);
public Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices (Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
abstract member ConfigureServices : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.ConfigureServices : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function ConfigureServices (configureDelegate As Action(Of HostBuilderContext, IServiceCollection)) As IHostBuilder

Parametri

configureDelegate
Action<HostBuilderContext,IServiceCollection>

Delegato per la configurazione di IConfigurationBuilder che verrà usato per costruire IConfiguration per l'host.

Restituisce

Stessa istanza di IHostBuilder per il concatenamento.

Implementazioni

Si applica a