Partager via


ServiceCollectionContainerBuilderExtensions.BuildServiceProvider Méthode

Définition

Surcharges

BuildServiceProvider(IServiceCollection)

Crée un ServiceProvider contenant des services du IServiceCollection fourni.

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la création de services et la validation d’étendue.

BuildServiceProvider(IServiceCollection, Boolean)

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.

BuildServiceProvider(IServiceCollection)

Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs

Crée un ServiceProvider contenant des services du IServiceCollection fourni.

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.

Retours

Le ServiceProvider.

S’applique à

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la création de services et la validation d’étendue.

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.

options
ServiceProviderOptions

Configure différents comportements des fournisseurs de services, notamment la création de services et la validation d’étendue.

Retours

Le ServiceProvider.

S’applique à

BuildServiceProvider(IServiceCollection, Boolean)

Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs
Source:
ServiceCollectionContainerBuilderExtensions.cs

Crée un ServiceProvider contenant des services du IServiceCollection fourni, en activant de façon facultative la validation de l’étendue.

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.

validateScopes
Boolean

true pour vérifier que les services délimités ne sont jamais résolus à partir du fournisseur racine ; sinon, false.

Retours

Le ServiceProvider.

S’applique à