Bagikan melalui


ServiceCollectionContainerBuilderExtensions.BuildServiceProvider Metode

Definisi

Overload

BuildServiceProvider(IServiceCollection)

ServiceProvider Membuat layanan yang berisi dari yang disediakanIServiceCollection.

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Membuat layanan yang ServiceProvider berisi dari yang disediakan IServiceCollection secara opsional mengaktifkan pembuatan layanan dan validasi cakupan.

BuildServiceProvider(IServiceCollection, Boolean)

ServiceProvider Membuat layanan yang berisi dari validasi cakupan yang disediakan IServiceCollection secara opsional memungkinkan.

BuildServiceProvider(IServiceCollection)

Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs

ServiceProvider Membuat layanan yang berisi dari yang disediakanIServiceCollection.

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

Parameter

services
IServiceCollection

Yang IServiceCollection berisi deskriptor layanan.

Mengembalikan

ServiceProvider.

Berlaku untuk

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs

Membuat layanan yang ServiceProvider berisi dari yang disediakan IServiceCollection secara opsional mengaktifkan pembuatan layanan dan validasi cakupan.

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

Parameter

services
IServiceCollection

Yang IServiceCollection berisi deskriptor layanan.

options
ServiceProviderOptions

Mengonfigurasi berbagai perilaku penyedia layanan termasuk pembuatan layanan dan validasi cakupan.

Mengembalikan

ServiceProvider.

Berlaku untuk

BuildServiceProvider(IServiceCollection, Boolean)

Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs
Sumber:
ServiceCollectionContainerBuilderExtensions.cs

ServiceProvider Membuat layanan yang berisi dari validasi cakupan yang disediakan IServiceCollection secara opsional memungkinkan.

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

Parameter

services
IServiceCollection

Yang IServiceCollection berisi deskriptor layanan.

validateScopes
Boolean

true untuk melakukan pemeriksaan memverifikasi bahwa layanan terlingkup tidak pernah diselesaikan dari penyedia akar; jika tidak, false.

Mengembalikan

ServiceProvider.

Berlaku untuk