ServiceCollectionExtensions.AddBot メソッド

定義

オーバーロード

名前 説明
AddBot<TBot>(IServiceCollection, Action<BotFrameworkOptions>)

IServiceCollectionに追加およびオプションでTBot設定を行います。

AddBot<TBot>(IServiceCollection, Func<IServiceProvider,TBot>, Action<BotFrameworkOptions>)

IServiceCollectionに追加およびオプションでTBot設定を行います。

AddBot<TBot>(IServiceCollection, TBot, Action<BotFrameworkOptions>)

シングルトンの bot インスタンスを追加し、オプションで IServiceCollectionに設定します。

AddBot<TBot>(IServiceCollection, Action<BotFrameworkOptions>)

IServiceCollectionに追加およびオプションでTBot設定を行います。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBot<TBot>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> configureAction = default) where TBot : class, Microsoft.Bot.Builder.IBot;
static member AddBot : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Bot : null and 'Bot :> Microsoft.Bot.Builder.IBot)
<Extension()>
Public Function AddBot(Of TBot As {Class, IBot}) (services As IServiceCollection, Optional configureAction As Action(Of BotFrameworkOptions) = Nothing) As IServiceCollection

型パラメーター

TBot

登録され、ボットフレームワークに公開される具体的なタイプの IBot です。

パラメーター

configureAction
Action<BotFrameworkOptions>

オプションのコールバック機能があり、提供された場合はボットのさらなる設定のために呼び出されます。

返品

操作が完了した後のこのインスタンスへの参照。

注釈

TBot一時的に登録され、各ターンごとにインスタンス化されます。

こちらもご覧ください

適用対象

AddBot<TBot>(IServiceCollection, Func<IServiceProvider,TBot>, Action<BotFrameworkOptions>)

IServiceCollectionに追加およびオプションでTBot設定を行います。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBot<TBot>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<IServiceProvider,TBot> botFactory, Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> configureAction = default) where TBot : class, Microsoft.Bot.Builder.IBot;
static member AddBot : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, 'Bot (requires 'Bot : null and 'Bot :> Microsoft.Bot.Builder.IBot)> * Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Bot : null and 'Bot :> Microsoft.Bot.Builder.IBot)
<Extension()>
Public Function AddBot(Of TBot As {Class, IBot}) (services As IServiceCollection, botFactory As Func(Of IServiceProvider, TBot), Optional configureAction As Action(Of BotFrameworkOptions) = Nothing) As IServiceCollection

型パラメーター

TBot

登録され、ボットフレームワークに公開される具体的なタイプの IBot です。

パラメーター

botFactory
Func<IServiceProvider,TBot>

TBotのインスタンスを呼び出したときに供給するファクトリーメソッドです。

configureAction
Action<BotFrameworkOptions>

オプションのコールバック機能があり、提供された場合はボットのさらなる設定のために呼び出されます。

返品

操作が完了した後のこのインスタンスへの参照。

注釈

botFactory一時的なものとして登録され、各ターンで発動されます。

こちらもご覧ください

適用対象

AddBot<TBot>(IServiceCollection, TBot, Action<BotFrameworkOptions>)

シングルトンの bot インスタンスを追加し、オプションで IServiceCollectionに設定します。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBot<TBot>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, TBot bot, Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> configureAction = default) where TBot : class, Microsoft.Bot.Builder.IBot;
static member AddBot : Microsoft.Extensions.DependencyInjection.IServiceCollection * 'Bot * Action<Microsoft.Bot.Builder.Integration.BotFrameworkOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Bot : null and 'Bot :> Microsoft.Bot.Builder.IBot)
<Extension()>
Public Function AddBot(Of TBot As {Class, IBot}) (services As IServiceCollection, bot As TBot, Optional configureAction As Action(Of BotFrameworkOptions) = Nothing) As IServiceCollection

型パラメーター

TBot

登録され、ボットフレームワークに公開される具体的なタイプの IBot です。

パラメーター

bot
TBot

Singletonとして登録されるボットのインスタンスです。

configureAction
Action<BotFrameworkOptions>

オプションのコールバック機能があり、提供された場合はボットのさらなる設定のために呼び出されます。

返品

操作が完了した後のこのインスタンスへの参照。

こちらもご覧ください

適用対象