共用方式為


BotComponent.ConfigureServices(IServiceCollection, IConfiguration) 方法

定義

Bot 元件的進入點,以在資源總管中註冊類型、取用服務集合中的組態和註冊服務。

public abstract void ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration);
abstract member ConfigureServices : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration -> unit
Public MustOverride Sub ConfigureServices (services As IServiceCollection, configuration As IConfiguration)

參數

services
IServiceCollection

要註冊相依性插入的服務集合。

configuration
IConfiguration

Bot 元件的組態。

適用於