共用方式為


StartupBase.CreateServiceProvider(IServiceCollection) 方法

定義

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

參數

services
IServiceCollection

要新增服務的 IServiceCollection

傳回

IServiceProvider

適用於