Compartilhar via


WebHostBuilderExtensions.UseDefaultServiceProvider Método

Definição

Sobrecargas

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Configura o provedor de serviços padrão

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Configura o provedor de serviços padrão

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Origem:
WebHostBuilderExtensions.cs
Origem:
WebHostBuilderExtensions.cs
Origem:
WebHostBuilderExtensions.cs

Configura o provedor de serviços padrão

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseDefaultServiceProvider(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IWebHostBuilder, configure As Action(Of WebHostBuilderContext, ServiceProviderOptions)) As IWebHostBuilder

Parâmetros

hostBuilder
IWebHostBuilder

O IWebHostBuilder a ser configurado.

configure
Action<WebHostBuilderContext,ServiceProviderOptions>

Um retorno de chamada usado para configurar o ServiceProviderOptions para o padrão IServiceProvider.

Retornos

O IWebHostBuilder.

Aplica-se a

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Origem:
WebHostBuilderExtensions.cs
Origem:
WebHostBuilderExtensions.cs
Origem:
WebHostBuilderExtensions.cs

Configura o provedor de serviços padrão

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseDefaultServiceProvider(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IWebHostBuilder, configure As Action(Of ServiceProviderOptions)) As IWebHostBuilder

Parâmetros

hostBuilder
IWebHostBuilder

O IWebHostBuilder a ser configurado.

configure
Action<ServiceProviderOptions>

Um retorno de chamada usado para configurar o ServiceProviderOptions para o padrão IServiceProvider.

Retornos

O IWebHostBuilder.

Aplica-se a