IStartup.ConfigureServices(IServiceCollection) 方法

定义

将服务注册到 IServiceCollection

public:
 IServiceProvider ^ ConfigureServices(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public IServiceProvider ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services);
abstract member ConfigureServices : Microsoft.Extensions.DependencyInjection.IServiceCollection -> IServiceProvider
Public Function ConfigureServices (services As IServiceCollection) As IServiceProvider

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

适用于