共用方式為


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

適用於