共用方式為


DefaultServiceProviderFactory.CreateServiceProvider 方法

定義

從容器建立器建立 IServiceProvider

public:
 virtual IServiceProvider ^ CreateServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ containerBuilder);
public IServiceProvider CreateServiceProvider (Microsoft.Extensions.DependencyInjection.IServiceCollection containerBuilder);
abstract member CreateServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> IServiceProvider
override this.CreateServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> IServiceProvider
Public Function CreateServiceProvider (containerBuilder As IServiceCollection) As IServiceProvider

參數

containerBuilder
IServiceCollection

容器產生器。

傳回

新建立的服務提供者。

實作

適用於