ServiceCollectionContainerBuilderExtensions.BuildServiceProvider Método

Definição

Sobrecargas

BuildServiceProvider(IServiceCollection)

Cria um ServiceProvider contendo serviços do IServiceCollection fornecido.

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Cria um ServiceProvider contendo serviços da IServiceCollection fornecida, opcionalmente habilitando a criação do serviço e a validação do escopo.

BuildServiceProvider(IServiceCollection, Boolean)

Cria um ServiceProvider contendo serviços da IServiceCollection fornecida, opcionalmente habilitando a validação de escopo.

BuildServiceProvider(IServiceCollection)

Cria um ServiceProvider contendo serviços do IServiceCollection fornecido.

public:
[System::Runtime::CompilerServices::Extension]
 static IServiceProvider ^ BuildServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ServiceProvider ^ BuildServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static IServiceProvider BuildServiceProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member BuildServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> IServiceProvider
static member BuildServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.ServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection) As IServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection) As ServiceProvider

Parâmetros

services
IServiceCollection

O IServiceCollection que contém os descritores de serviço.

Retornos

IServiceProvider
ServiceProvider

O ServiceProvider.

Aplica-se a

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Cria um ServiceProvider contendo serviços da IServiceCollection fornecida, opcionalmente habilitando a criação do serviço e a validação do escopo.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ServiceProvider ^ BuildServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^ options);
public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.DependencyInjection.ServiceProviderOptions options);
static member BuildServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.DependencyInjection.ServiceProviderOptions -> Microsoft.Extensions.DependencyInjection.ServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection, options As ServiceProviderOptions) As ServiceProvider

Parâmetros

services
IServiceCollection

O IServiceCollection que contém os descritores de serviço.

options
ServiceProviderOptions

Configura vários comportamentos do provedor de serviços, incluindo a criação do serviço e a validação do escopo.

Retornos

ServiceProvider

O ServiceProvider.

Aplica-se a

BuildServiceProvider(IServiceCollection, Boolean)

Cria um ServiceProvider contendo serviços da IServiceCollection fornecida, opcionalmente habilitando a validação de escopo.

public:
[System::Runtime::CompilerServices::Extension]
 static IServiceProvider ^ BuildServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, bool validateScopes);
public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ServiceProvider ^ BuildServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, bool validateScopes);
public static IServiceProvider BuildServiceProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, bool validateScopes);
public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, bool validateScopes);
static member BuildServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection * bool -> IServiceProvider
static member BuildServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection * bool -> Microsoft.Extensions.DependencyInjection.ServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection, validateScopes As Boolean) As IServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection, validateScopes As Boolean) As ServiceProvider

Parâmetros

services
IServiceCollection

O IServiceCollection que contém os descritores de serviço.

validateScopes
Boolean

true para realizar a análise verificando se os serviços no escopo nunca são resolvidos do provedor raiz; caso contrário, false.

Retornos

IServiceProvider
ServiceProvider

O ServiceProvider.

Aplica-se a