public AcsSmsAdapter GetAcsBotAdapter(AcsSmsAdapterOptions options, IStorage storage, BotSettings settings, UserState userState, CrossChannelUserState crossChannelUserState, ConversationState conversationState, IServiceProvider s) { var adapter = new AcsSmsAdapter(options); adapter .UseStorage(storage) .UseBotState(userState, conversationState, crossChannelUserState) .Use(new RegisterClassMiddleware <IConfiguration>(Configuration)) .Use(s.GetService <TelemetryInitializerMiddleware>()); adapter.OnTurnError = async(turnContext, exception) => { await turnContext.SendActivityAsync(exception.Message).ConfigureAwait(false); await conversationState.ClearStateAsync(turnContext).ConfigureAwait(false); await conversationState.SaveChangesAsync(turnContext).ConfigureAwait(false); }; return(adapter); }
public AcsSmsController(AcsSmsAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; }
public ComposerBotWithSms(ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, BotFrameworkClient skillClient, SkillConversationIdFactoryBase conversationIdFactory, IBotTelemetryClient telemetryClient, string rootDialog, string defaultLocale, AcsSmsAdapter acsSmsAdapter, IConfiguration configuration, bool removeRecipientMention = false) : base(conversationState, userState, resourceExplorer, skillClient, conversationIdFactory, telemetryClient, rootDialog, defaultLocale, removeRecipientMention) { _acsSmsAdapter = acsSmsAdapter; _configuration = configuration; }