StartupBase<TBuilder>.CreateServiceProvider(IServiceCollection) 方法

定义

IServiceProvider为给定 IServiceCollection创建实例。

public:
 override IServiceProvider ^ CreateServiceProvider(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public override IServiceProvider CreateServiceProvider (Microsoft.Extensions.DependencyInjection.IServiceCollection services);
override this.CreateServiceProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> IServiceProvider
Public Overrides Function CreateServiceProvider (services As IServiceCollection) As IServiceProvider

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

IServiceProvider

适用于