ServiceCollectionContainerBuilderExtensions.BuildServiceProvider Méthode

Définition

Surcharges

BuildServiceProvider(IServiceCollection)

Crée un ServiceProvider contenant des services du IServiceCollection fourni.Creates a ServiceProvider containing services from the provided IServiceCollection.

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation.

BuildServiceProvider(IServiceCollection, Boolean)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation.

BuildServiceProvider(IServiceCollection)

Crée un ServiceProvider contenant des services du IServiceCollection fourni.Creates a ServiceProvider containing services from the provided IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ServiceProvider ^ BuildServiceProvider(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 -> Microsoft.Extensions.DependencyInjection.ServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection) As ServiceProvider

Paramètres

services
IServiceCollection

IServiceCollection contenant les descripteurs de service.The IServiceCollection containing service descriptors.

Retours

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation.

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

Paramètres

services
IServiceCollection

IServiceCollection contenant les descripteurs de service.The IServiceCollection containing service descriptors.

options
ServiceProviderOptions

Configure différents comportements de fournisseur de services.Configures various service provider behaviors.

Retours

BuildServiceProvider(IServiceCollection, Boolean)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::ServiceProvider ^ BuildServiceProvider(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 -> Microsoft.Extensions.DependencyInjection.ServiceProvider
<Extension()>
Public Function BuildServiceProvider (services As IServiceCollection, validateScopes As Boolean) As ServiceProvider

Paramètres

services
IServiceCollection

IServiceCollection contenant les descripteurs de service.The IServiceCollection containing service descriptors.

validateScopes
Boolean

true pour vérifier que les services délimités ne sont jamais résolus à partir du fournisseur racine ; sinon, false.true to perform check verifying that scoped services never gets resolved from root provider; otherwise, false.

Retours

S’applique à