Showing preview only (1,961K chars total). Download the full file or copy to clipboard to get everything.
Repository: Microsoft/BotFramework-Samples
Branch: master
Commit: 234f3fb2e445
Files: 460
Total size: 1.8 MB
Directory structure:
gitextract_fa8vrjl3/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── SDKV4-Samples/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── _config.yml
│ ├── dotnet_core/
│ │ ├── ComplexDialogBot/
│ │ │ ├── BotBuilder.ruleset
│ │ │ ├── ComplexDialogBot.cs
│ │ │ ├── ComplexDialogBot.csproj
│ │ │ ├── ComplexDialogBotAccessors.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── complex-dialog.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── DialogInterruptionsBot/
│ │ │ ├── BotBuilder.ruleset
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── DialogInterruptionsBot.cs
│ │ │ ├── DialogInterruptionsBot.csproj
│ │ │ ├── DialogInterruptionsBotAccessors.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── dialog-interruptions.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── DialogPromptBot/
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── DialogPromptBot.cs
│ │ │ ├── DialogPromptBot.csproj
│ │ │ ├── DialogPromptBot.ruleset
│ │ │ ├── DialogPromptBot.xml
│ │ │ ├── DialogPromptBotAccessors.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.json
│ │ │ ├── dialog-prompt.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── PromptUsersForInput/
│ │ │ ├── ConversationFlow.cs
│ │ │ ├── CustomPromptBot.cs
│ │ │ ├── CustomPromptBot.ruleset
│ │ │ ├── CustomPromptBotAccessors.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── PromptUsersForInput.csproj
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── custom-prompt.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── StateBot/
│ │ │ ├── ConversationData.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── StateBot.cs
│ │ │ ├── StateBot.csproj
│ │ │ ├── StateBot.ruleset
│ │ │ ├── StateBot.sln
│ │ │ ├── StateBot.xml
│ │ │ ├── StateBotAccessors.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── state.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── nlp-with-dispatch/
│ │ │ ├── QnAMaker.tsv
│ │ │ ├── home-automation.json
│ │ │ ├── nlp-with-dispatchDispatch.json
│ │ │ └── weather.json
│ │ └── nlp-with-luis/
│ │ └── reminders-with-entities.json
│ └── js/
│ ├── DialogPromptBot/
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── dialog-prompt.bot
│ │ ├── index.js
│ │ └── package.json
│ ├── PromptUsersForInput/
│ │ ├── .eslintrc.js
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── index.js
│ │ ├── package.json
│ │ ├── resources/
│ │ │ └── echo.chat
│ │ └── simplePrompts.bot
│ ├── complexDialogBot/
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── ComplexDialogBot.bot
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── iisnode.yml
│ │ ├── index.js
│ │ ├── package.json
│ │ └── web.config
│ ├── nlp-with-dispatch/
│ │ ├── QnAMaker.tsv
│ │ ├── home-automation.json
│ │ ├── nlp-with-dispatchDispatch.json
│ │ └── weather.json
│ ├── nlp-with-luis/
│ │ └── reminders-with-entities.json
│ └── stateBot/
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts/
│ │ └── msbotClone/
│ │ └── bot.recipe
│ ├── index.js
│ ├── package.json
│ ├── resources/
│ │ └── echo.chat
│ └── stateBot.bot
├── SECURITY.md
├── StackOverflow-Bot/
│ ├── .gitignore
│ ├── DialogAnalyzerFunc/
│ │ ├── AnalyzeDialog.cs
│ │ ├── Clients/
│ │ │ ├── DialogAnalyzerClient.cs
│ │ │ └── DialogDataInterpreter.cs
│ │ ├── DialogAnalyzerFunc.csproj
│ │ ├── Extensions/
│ │ │ ├── EnumerableExtensions.cs
│ │ │ └── HttpExtensions.cs
│ │ ├── Models/
│ │ │ ├── ComputerVisionImageAnalysisResult.cs
│ │ │ ├── DialogAnalysisResult.cs
│ │ │ ├── HandwritingRecognitionResult.cs
│ │ │ ├── ImageTextRegion.cs
│ │ │ └── TextAnalyticsResult.cs
│ │ ├── Services/
│ │ │ ├── ComputerVisionService.cs
│ │ │ └── TextAnalyticsService.cs
│ │ ├── Utilities/
│ │ │ ├── HttpClientUtility.cs
│ │ │ └── StringUtility.cs
│ │ └── host.json
│ ├── LICENSE
│ ├── README.md
│ ├── StackBot/
│ │ ├── Dockerfile
│ │ ├── StackBot.njsproj
│ │ ├── data/
│ │ │ ├── jokes.json
│ │ │ ├── luis.json
│ │ │ └── smalltalk.tsv
│ │ ├── dialogs/
│ │ │ ├── brain.js
│ │ │ ├── joke.js
│ │ │ ├── keywordPrompt.js
│ │ │ ├── languages.js
│ │ │ ├── menu.js
│ │ │ ├── screenshot.js
│ │ │ ├── search.js
│ │ │ └── smalltalk.js
│ │ ├── index.js
│ │ ├── lib/
│ │ │ ├── attachments.js
│ │ │ ├── bingsearchclient.js
│ │ │ ├── cognitiveservices.js
│ │ │ ├── dialoganalyzerclient.js
│ │ │ ├── qnaclient.js
│ │ │ ├── sentimentanalyzerclient.js
│ │ │ └── smalltalk.js
│ │ ├── package.json
│ │ └── static/
│ │ └── index.html
│ ├── StackCode/
│ │ ├── StackCode-0.1.1.vsix
│ │ ├── out/
│ │ │ ├── src/
│ │ │ │ ├── bot/
│ │ │ │ │ └── bot.html
│ │ │ │ └── extension.js
│ │ │ └── test/
│ │ │ ├── extension.test.js
│ │ │ └── index.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── bot/
│ │ │ │ └── bot.html
│ │ │ └── extension.ts
│ │ └── tsconfig.json
│ ├── StackOverflowBot.sln
│ └── env.template
├── _config.yml
├── blog-samples/
│ ├── CSharp/
│ │ ├── AzureSql-StateClient/
│ │ │ ├── Microsoft.Bot.Sample.AzureSql/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Microsoft.Bot.Sample.AzureSql.csproj
│ │ │ │ ├── Migrations/
│ │ │ │ │ ├── 201707121827490_Initial Setup.Designer.cs
│ │ │ │ │ ├── 201707121827490_Initial Setup.cs
│ │ │ │ │ ├── 201707121827490_Initial Setup.resx
│ │ │ │ │ └── Configuration.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── SqlStateService/
│ │ │ │ │ ├── SqlBotDataContext.cs
│ │ │ │ │ ├── SqlBotDataEntity.cs
│ │ │ │ │ └── SqlBotDataStore.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Microsoft.Bot.Sample.AzureSql.sln
│ │ │ └── README.md
│ │ ├── Bot-Feedback-Sample/
│ │ │ ├── Bot-Feedback-Sample/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── ApplicationInsights.config
│ │ │ │ ├── Bot-Feedback-Sample.csproj
│ │ │ │ ├── Connected Services/
│ │ │ │ │ └── Application Insights/
│ │ │ │ │ └── ConnectedService.json
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── FeedbackDialog.cs
│ │ │ │ │ └── QnADialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Bot-Feedback-Sample.sln
│ │ │ └── README.md
│ │ ├── BotStateExport/
│ │ │ ├── .gitignore
│ │ │ ├── BotStateExport/
│ │ │ │ ├── BotStateExport/
│ │ │ │ │ ├── App.config
│ │ │ │ │ ├── BotStateExport.csproj
│ │ │ │ │ ├── DocumentDbBotDataStore.cs
│ │ │ │ │ ├── Extensions.cs
│ │ │ │ │ ├── Program.cs
│ │ │ │ │ ├── Properties/
│ │ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ │ ├── TableBotDataStore.cs
│ │ │ │ │ └── packages.config
│ │ │ │ └── BotStateExport.sln
│ │ │ └── README.md
│ │ ├── Custom-State-BotBuilder-Azure-Sample/
│ │ │ ├── Azure-DocumentDB-Custom-State/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Azure-DocumentDB-Custom-State.csproj
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── README.md
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Azure-Table-Custom-State/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Azure-Table-Custom-State.csproj
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── README.md
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Custom-State-Sample.sln
│ │ │ └── README.md
│ │ ├── FacebookHandover/
│ │ │ ├── FacebookHandover.sln
│ │ │ ├── FacebookModel/
│ │ │ │ ├── FacebookPassThreadControl.cs
│ │ │ │ ├── FacebookPayload.cs
│ │ │ │ ├── FacebookPsid.cs
│ │ │ │ ├── FacebookRequestThreadControl.cs
│ │ │ │ ├── FacebookStandby.cs
│ │ │ │ ├── FacebookTakeThreadControl.cs
│ │ │ │ └── FacebookThreadControlHelper.cs
│ │ │ ├── Primary/
│ │ │ │ ├── Bots/
│ │ │ │ │ └── PrimaryBot.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── BotController.cs
│ │ │ │ ├── DeploymentTemplates/
│ │ │ │ │ ├── template-with-new-rg.json
│ │ │ │ │ └── template-with-preexisting-rg.json
│ │ │ │ ├── Primary.csproj
│ │ │ │ ├── Program.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── launchSettings.json
│ │ │ │ ├── Startup.cs
│ │ │ │ ├── appsettings.Development.json
│ │ │ │ ├── appsettings.json
│ │ │ │ └── wwwroot/
│ │ │ │ └── default.htm
│ │ │ ├── README.md
│ │ │ └── Secondary/
│ │ │ ├── Bots/
│ │ │ │ └── SecondaryBot.cs
│ │ │ ├── Controllers/
│ │ │ │ └── BotController.cs
│ │ │ ├── DeploymentTemplates/
│ │ │ │ ├── template-with-new-rg.json
│ │ │ │ └── template-with-preexisting-rg.json
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── Secondary.csproj
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── Luis-Scorable-QnA/
│ │ │ ├── .gitignore
│ │ │ ├── Luis-Scorable-Qna/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── CommonResponsesDialog.cs
│ │ │ │ │ ├── CommonResponsesScorable.cs
│ │ │ │ │ ├── JokeDialog.cs
│ │ │ │ │ ├── LuisDialog.cs
│ │ │ │ │ ├── QnaDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Luis-Scorable-Qna-Demo.csproj
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ └── Luis-Scorable-Qna.sln
│ │ ├── MockChannel/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MockChannelController.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── MockChannel.csproj
│ │ │ ├── MockChannel.sln
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ └── packages.config
│ │ ├── Qna-Rich-Cards/
│ │ │ ├── Qna-Rich-Cards/
│ │ │ │ ├── AnswerFormats/
│ │ │ │ │ └── JsonQnaAnswer.cs
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── QnaDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Qna-Rich-Cards.csproj
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Qna-Rich-Cards.sln
│ │ │ └── README.md
│ │ ├── ScorableBotSample/
│ │ │ ├── .gitattributes
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── ScorableBot/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── Balance/
│ │ │ │ │ │ ├── Current/
│ │ │ │ │ │ │ └── CheckBalanceCurrentDialog.cs
│ │ │ │ │ │ ├── Savings/
│ │ │ │ │ │ │ └── CheckBalanceSavingsDialog.cs
│ │ │ │ │ │ ├── ScorableCheckBalance.cs
│ │ │ │ │ │ └── ScorableCheckBalanceDialog.cs
│ │ │ │ │ ├── MakePayment/
│ │ │ │ │ │ ├── ScorableMakePayment.cs
│ │ │ │ │ │ └── ScorableMakePaymentDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── ScorableBot.csproj
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ └── ScorableBotSample.sln
│ │ └── TriviaBotSpeechSample/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── TriviaApp/
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cs
│ │ │ ├── BotConnection.cs
│ │ │ ├── Converters/
│ │ │ │ └── BoolToVisibilityConverter.cs
│ │ │ ├── MainPage.xaml
│ │ │ ├── MainPage.xaml.cs
│ │ │ ├── Package.appxmanifest
│ │ │ ├── Properties/
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ └── Default.rd.xml
│ │ │ ├── TriviaApp.csproj
│ │ │ ├── ViewModels/
│ │ │ │ ├── AnswerCard.cs
│ │ │ │ ├── ChatCard.cs
│ │ │ │ ├── CountdownTimer.cs
│ │ │ │ └── ObservableDictionary.cs
│ │ │ ├── packages.config
│ │ │ └── project.json
│ │ ├── TriviaBot/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Luis/
│ │ │ │ ├── LuisEntity.cs
│ │ │ │ ├── LuisIntent.cs
│ │ │ │ ├── LuisResult.cs
│ │ │ │ └── QueryLuis.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Runtime/
│ │ │ │ ├── BotState.cs
│ │ │ │ ├── Categories.cs
│ │ │ │ ├── EnumExtensions.cs
│ │ │ │ ├── Extensions.cs
│ │ │ │ ├── Responses.cs
│ │ │ │ ├── SsmlWrapper.cs
│ │ │ │ ├── TriviaResponse.cs
│ │ │ │ └── Utility.cs
│ │ │ ├── Shared/
│ │ │ │ ├── AppEntities.cs
│ │ │ │ └── MessageType.cs
│ │ │ ├── TriviaBot.csproj
│ │ │ ├── TriviaDialog.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── TriviaBotLU.json
│ │ └── TriviaBotSpeechSample.sln
│ ├── Node/
│ │ ├── Blog-CustomState-CosmosDB/
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ └── package.json
│ │ ├── Blog-Qna-Attachments/
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ └── package.json
│ │ └── Blog-Redux-Bot/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── app.js
│ │ ├── package.json
│ │ ├── public/
│ │ │ └── index.html
│ │ └── redux/
│ │ ├── conversationActions.js
│ │ ├── dialogActions.js
│ │ ├── loadStore.js
│ │ ├── reducer.js
│ │ └── sagas/
│ │ ├── default.js
│ │ └── dialog.js
│ └── README.md
├── docs-samples/
│ ├── CSharp/
│ │ └── Simple-LUIS-Notes-Sample/
│ │ ├── Notes.json
│ │ ├── Simple-LUIS-Notes-Sample/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs/
│ │ │ │ └── SimpleNoteDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── NotesBot.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── Simple-LUIS-Notes-Sample.sln
│ │ ├── VSIX/
│ │ │ └── readme.md
│ │ └── readme.md
│ ├── Node/
│ │ └── basics-naturalLanguage/
│ │ ├── Notes.json
│ │ ├── basicNote-intentDialog.js
│ │ ├── basicNote.js
│ │ └── readme.md
│ ├── README.md
│ ├── V4/
│ │ └── JS/
│ │ └── contosocafebot-luis-dialogs/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── launch.json
│ │ ├── cafeLUISModel.json
│ │ ├── lib/
│ │ │ ├── CafeLUISModel.d.ts
│ │ │ ├── CafeLUISModel.js
│ │ │ ├── luisbot.d.ts
│ │ │ └── luisbot.js
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── src/
│ │ │ ├── .vscode/
│ │ │ │ └── launch.json
│ │ │ ├── CafeLUISModel.ts
│ │ │ └── luisbot.ts
│ │ └── tsconfig.json
│ ├── v3Node/
│ │ └── startNewDialog/
│ │ └── botadapter.js
│ └── web-chat-speech/
│ ├── index.html
│ └── readme.md
└── swagger/
├── ConnectorAPI.json
└── StateAPI.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# Misc
package-lock.json
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
================================================
FILE: README.md
================================================
# Bot Framework Samples
This repo contains samples that are specifically used in the blog posts. You can find additional [SDK V4](https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples) and [SDK V3](https://github.com/Microsoft/BotBuilder-Samples/tree/v3-sdk-samples) in the BotBuilder-Samples repo.
## Contributing
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
================================================
FILE: SDKV4-Samples/.gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: SDKV4-Samples/.gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
================================================
FILE: SDKV4-Samples/LICENSE
================================================
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
================================================
FILE: SDKV4-Samples/README.md
================================================
# Bot Framework Samples
This branch is for Bot Builder SDK V4 samples used in the documentation.
## Contributing
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
================================================
FILE: SDKV4-Samples/_config.yml
================================================
theme: jekyll-theme-cayman
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/BotBuilder.ruleset
================================================
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1011" Action="None" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1129" Action="None" />
<Rule Id="SA1305" Action="Warning" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1412" Action="Warning" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1609" Action="Warning" />
<Rule Id="SA1633" Action="None" />
</Rules>
<Rules AnalyzerId="AsyncUsageAnalyzers" RuleNamespace="AsyncUsageAnalyzers">
<Rule Id="AvoidAsyncVoid" Action="Warning" />
</Rules>
</RuleSet>
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Choices;
using Microsoft.Bot.Schema;
/// <summary>
/// Represents a bot that processes incoming activities.
/// For each user interaction, an instance of this class is created and the OnTurnAsync method is called.
/// This is a Transient lifetime service. Transient lifetime services are created
/// each time they're requested. For each Activity received, a new instance of this
/// class is created. Objects that are expensive to construct, or have a lifetime
/// beyond the single turn, should be carefully managed.
/// For example, the <see cref="MemoryStorage"/> object and associated
/// <see cref="IStatePropertyAccessor{T}"/> object are created with a singleton lifetime.
/// </summary>
/// <seealso cref="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.1"/>
public class ComplexDialogBot : IBot
{
private const string WelcomeText =
"Welcome to ComplexDialogBot. This bot provides a complex conversation, with multiple dialogs. " +
"Type anything to get started.";
// Define the dialog and prompt names for the bot.
private const string TopLevelDialog = "dialog-topLevel";
private const string ReviewSelectionDialog = "dialog-reviewSeleciton";
private const string NamePrompt = "prompt-name";
private const string AgePrompt = "prompt-age";
private const string SelectionPrompt = "prompt-companySlection";
// Define a "done" response for the company selection prompt.
private const string DoneOption = "done";
// Define value names for values tracked inside the dialogs.
private const string UserInfo = "value-userInfo";
private const string CompaniesSelected = "value-companiesSelected";
// Define the company choices for the company selection prompt.
private readonly string[] _companyOptions = new string[]
{
"Adatum Corporation", "Contoso Suites", "Graphic Design Institute", "Wide World Importers",
};
private readonly ComplexDialogBotAccessors _accessors;
/// <summary>
/// The <see cref="DialogSet"/> that contains all the Dialogs that can be used at runtime.
/// </summary>
private readonly DialogSet _dialogs;
/// <summary>
/// Initializes a new instance of the <see cref="ComplexDialogBot"/> class.
/// </summary>
/// <param name="accessors">A class containing <see cref="IStatePropertyAccessor{T}"/> used to manage state.</param>
public ComplexDialogBot(ComplexDialogBotAccessors accessors)
{
_accessors = accessors ?? throw new ArgumentNullException(nameof(accessors));
// Create a dialog set for the bot. It requires a DialogState accessor, with which
// to retrieve the dialog state from the turn context.
_dialogs = new DialogSet(accessors.DialogStateAccessor);
// Add the prompts we need to the dialog set.
_dialogs
.Add(new TextPrompt(NamePrompt))
.Add(new NumberPrompt<int>(AgePrompt))
.Add(new ChoicePrompt(SelectionPrompt));
// Add the dialogs we need to the dialog set.
_dialogs.Add(new WaterfallDialog(TopLevelDialog)
.AddStep(NameStepAsync)
.AddStep(AgeStepAsync)
.AddStep(StartSelectionStepAsync)
.AddStep(AcknowledgementStepAsync));
_dialogs.Add(new WaterfallDialog(ReviewSelectionDialog)
.AddStep(SelectionStepAsync)
.AddStep(LoopStepAsync));
}
/// <summary>
/// Every conversation turn for our EchoBot will call this method.
/// </summary>
/// <param name="turnContext">A <see cref="ITurnContext"/> containing all the data needed
/// for processing this conversation turn. </param>
/// <param name="cancellationToken">(Optional) A <see cref="CancellationToken"/> that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> that represents the work queued to execute.</returns>
/// <seealso cref="BotStateSet"/>
/// <seealso cref="ConversationState"/>
/// <seealso cref="IMiddleware"/>
public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
{
if (turnContext == null)
{
throw new ArgumentNullException(nameof(turnContext));
}
// Handle Message activity type, which is the main activity type for shown within a conversational interface
// Message activities may contain text, speech, interactive cards, and binary or unknown attachments.
// see https://aka.ms/about-bot-activity-message to learn more about the message and other activity types
if (turnContext.Activity.Type == ActivityTypes.Message)
{
// Run the DialogSet - let the framework identify the current state of the dialog from
// the dialog stack and figure out what (if any) is the active dialog.
DialogContext dialogContext = await _dialogs.CreateContextAsync(turnContext, cancellationToken);
DialogTurnResult results = await dialogContext.ContinueDialogAsync(cancellationToken);
switch (results.Status)
{
case DialogTurnStatus.Cancelled:
case DialogTurnStatus.Empty:
// If there is no active dialog, we should clear the user info and start a new dialog.
await _accessors.UserProfileAccessor.SetAsync(turnContext, new UserProfile(), cancellationToken);
await _accessors.UserState.SaveChangesAsync(turnContext, false, cancellationToken);
await dialogContext.BeginDialogAsync(TopLevelDialog, null, cancellationToken);
break;
case DialogTurnStatus.Complete:
// If we just finished the dialog, capture and display the results.
UserProfile userInfo = results.Result as UserProfile;
string status = "You are signed up to review "
+ (userInfo.CompaniesToReview.Count is 0 ? "no companies" : string.Join(" and ", userInfo.CompaniesToReview))
+ ".";
await turnContext.SendActivityAsync(status);
await _accessors.UserProfileAccessor.SetAsync(turnContext, userInfo, cancellationToken);
await _accessors.UserState.SaveChangesAsync(turnContext, false, cancellationToken);
break;
case DialogTurnStatus.Waiting:
// If there is an active dialog, we don't need to do anything here.
break;
}
await _accessors.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken);
}
// Processes ConversationUpdate Activities to welcome the user.
else if (turnContext.Activity.Type == ActivityTypes.ConversationUpdate)
{
if (turnContext.Activity.MembersAdded != null)
{
await SendWelcomeMessageAsync(turnContext, cancellationToken);
}
}
else
{
await turnContext.SendActivityAsync($"{turnContext.Activity.Type} event detected", cancellationToken: cancellationToken);
}
}
/// <summary>
/// Sends a welcome message to the user.
/// </summary>
/// <param name="turnContext">A <see cref="ITurnContext"/> containing all the data needed
/// for processing this conversation turn. </param>
/// <param name="cancellationToken">(Optional) A <see cref="CancellationToken"/> that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> that represents the work queued to execute.</returns>
private static async Task SendWelcomeMessageAsync(ITurnContext turnContext, CancellationToken cancellationToken)
{
foreach (ChannelAccount member in turnContext.Activity.MembersAdded)
{
if (member.Id != turnContext.Activity.Recipient.Id)
{
Activity reply = turnContext.Activity.CreateReply();
reply.Text = WelcomeText;
await turnContext.SendActivityAsync(reply, cancellationToken);
}
}
}
/// <summary>The first step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> NameStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
// Create an object in which to collect the user's information within the dialog.
stepContext.Values[UserInfo] = new UserProfile();
// Ask the user to enter their name.
return await stepContext.PromptAsync(
NamePrompt,
new PromptOptions { Prompt = MessageFactory.Text("Please enter your name.") },
cancellationToken);
}
/// <summary>The second step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private async Task<DialogTurnResult> AgeStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's name to what they entered in response to the name prompt.
((UserProfile)stepContext.Values[UserInfo]).Name = (string)stepContext.Result;
// Ask the user to enter their age.
return await stepContext.PromptAsync(
AgePrompt,
new PromptOptions { Prompt = MessageFactory.Text("Please enter your age.") },
cancellationToken);
}
/// <summary>The third step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private async Task<DialogTurnResult> StartSelectionStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's age to what they entered in response to the age prompt.
int age = (int)stepContext.Result;
((UserProfile)stepContext.Values[UserInfo]).Age = age;
if (age < 25)
{
// If they are too young, skip the review selection dialog, and pass an empty list to the next step.
await stepContext.Context.SendActivityAsync(
MessageFactory.Text("You must be 25 or older to participate."),
cancellationToken);
return await stepContext.NextAsync(new List<string>(), cancellationToken);
}
else
{
// Otherwise, start the review selection dialog.
return await stepContext.BeginDialogAsync(ReviewSelectionDialog, null, cancellationToken);
}
}
/// <summary>The final step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private async Task<DialogTurnResult> AcknowledgementStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's company selection to what they entered in the review-selection dialog.
List<string> list = stepContext.Result as List<string>;
((UserProfile)stepContext.Values[UserInfo]).CompaniesToReview = list ?? new List<string>();
// Thank them for participating.
await stepContext.Context.SendActivityAsync(
MessageFactory.Text($"Thanks for participating, {((UserProfile)stepContext.Values[UserInfo]).Name}."),
cancellationToken);
// Exit the dialog, returning the collected user information.
return await stepContext.EndDialogAsync(stepContext.Values[UserInfo], cancellationToken);
}
/// <summary>The first step of the review-selection dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private async Task<DialogTurnResult> SelectionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
// Continue using the same selection list, if any, from the previous iteration of this dialog.
List<string> list = stepContext.Options as List<string> ?? new List<string>();
stepContext.Values[CompaniesSelected] = list;
// Create a prompt message.
string message;
if (list.Count is 0)
{
message = $"Please choose a company to review, or `{DoneOption}` to finish.";
}
else
{
message = $"You have selected **{list[0]}**. You can review an additional company, " +
$"or choose `{DoneOption}` to finish.";
}
// Create the list of options to choose from.
List<string> options = _companyOptions.ToList();
options.Add(DoneOption);
if (list.Count > 0)
{
options.Remove(list[0]);
}
// Prompt the user for a choice.
return await stepContext.PromptAsync(
SelectionPrompt,
new PromptOptions
{
Prompt = MessageFactory.Text(message),
RetryPrompt = MessageFactory.Text("Please choose an option from the list."),
Choices = ChoiceFactory.ToChoices(options),
},
cancellationToken);
}
/// <summary>The final step of the review-selection dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private async Task<DialogTurnResult> LoopStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
// Retrieve their selection list, the choice they made, and whether they chose to finish.
List<string> list = stepContext.Values[CompaniesSelected] as List<string>;
FoundChoice choice = (FoundChoice)stepContext.Result;
bool done = choice.Value == DoneOption;
if (!done)
{
// If they chose a company, add it to the list.
list.Add(choice.Value);
}
if (done || list.Count is 2)
{
// If they're done, exit and return their list.
return await stepContext.EndDialogAsync(list, cancellationToken);
}
else
{
// Otherwise, repeat this dialog, passing in the list from this iteration.
return await stepContext.ReplaceDialogAsync(ReviewSelectionDialog, list, cancellationToken);
}
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<CodeAnalysisRuleSet>BotBuilder.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<None Update="*.bot">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Configuration" Version="4.1.5" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta008" PrivateAssets="all" />
</ItemGroup>
</Project>
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBotAccessors.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
namespace Microsoft.BotBuilderSamples
{
/// <summary>
/// This class is created as a Singleton and passed into the IBot-derived constructor.
/// - See <see cref="ComplexDialogBot"/> constructor for how that is injected.
/// - See the Startup.cs file for more details on creating the Singleton that gets
/// injected into the constructor.
/// </summary>
public class ComplexDialogBotAccessors
{
/// <summary>
/// Initializes a new instance of the <see cref="ComplexDialogBotAccessors"/> class.
/// Contains the <see cref="ConversationState"/> and associated <see cref="IStatePropertyAccessor{T}"/>.
/// </summary>
/// <param name="conversationState">The state object that stores the dialog state.</param>
/// <param name="userState">The state object that stores the user state.</param>
public ComplexDialogBotAccessors(ConversationState conversationState, UserState userState)
{
ConversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState));
UserState = userState ?? throw new ArgumentNullException(nameof(userState));
}
/// <summary>
/// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for ConversationDialogState.
/// </summary>
/// <value>
/// The accessor stores the dialog state for the conversation.
/// </value>
public IStatePropertyAccessor<DialogState> DialogStateAccessor { get; set; }
/// <summary>
/// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for CounterState.
/// </summary>
/// <value>
/// The accessor stores user data.
/// </value>
public IStatePropertyAccessor<UserProfile> UserProfileAccessor { get; set; }
/// <summary>
/// Gets the <see cref="ConversationState"/> object for the conversation.
/// </summary>
/// <value>The <see cref="ConversationState"/> object.</value>
public ConversationState ConversationState { get; }
/// <summary>
/// Gets the <see cref="UserState"/> object for the conversation.
/// </summary>
/// <value>The <see cref="UserState"/> object.</value>
public UserState UserState { get; }
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/DeploymentScripts/MsbotClone/bot.recipe
================================================
{
"version": "1.0",
"resources": [
{
"type": "endpoint",
"id": "24",
"name": "Sample",
"url": "http://localhost:3978/api/messages"
},
{
"type": "endpoint",
"id": "2",
"name": "production",
"url": "https://your-bot-url.azurewebsites.net/api/messages"
},
{
"type": "abs",
"id": "3",
"name": "complex-dialog-Bot"
},
{
"type": "appInsights",
"id": "4",
"name": "complex-dialog-Insights"
},
{
"type": "blob",
"id": "5",
"name": "complex-dialog-Blob",
"container": "botstatestore"
}
]
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/Program.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace Microsoft.BotBuilderSamples
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureLogging((hostingContext, logging) =>
{
// Add Azure Logging
logging.AddAzureWebAppDiagnostics();
// Logging Options.
// There are other logging options available:
// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1
// logging.AddDebug();
// logging.AddConsole();
})
// Logging Options.
// Consider using Application Insights for your logging and metrics needs.
// https://azure.microsoft.com/en-us/services/application-insights/
// .UseApplicationInsights()
.UseStartup<Startup>()
.Build();
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/Properties/launchSettings.json
================================================
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3978/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"_5.MultiTurn_Prompts_Bot": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:3978/"
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/README.md
================================================
This sample creates a complex conversation with dialogs and ASP.Net Core 2.
# To try this sample
- Clone the samples repository
```bash
git clone https://github.com/Microsoft/BotFramework-Samples.git
```
- [Optional] Update the `appsettings.json` file under `BotFramework-Samples/SDKV4-Samples/dotnet_core/ComplexDialogBot/` with your botFileSecret.
For Azure Bot Service bots, you can find the botFileSecret under application settings.
# Running Locally
## Visual Studio
- Navigate to the samples folder (`BotFramework-Samples/SDKV4-Samples/dotnet_core/ComplexDialogBot/`) and open ComplexDialogBot.csproj in Visual Studio.
- Run the project (press `F5` key).
## .NET Core CLI
- Install the [.NET Core CLI tools](https://docs.microsoft.com/dotnet/core/tools/?tabs=netcore2x).
- Using the command line, navigate to `BotFramework-Samples/SDKV4-Samples/dotnet_core/ComplexDialogBot/` folder.
- Type `dotnet run`.
## Testing the bot using Bot Framework Emulator
[Microsoft Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot
developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the Bot Framework emulator from [here](https://aka.ms/botframeworkemulator).
## Connect to bot using Bot Framework Emulator **V4**
- Launch the Bot Framework Emulator.
- File -> Open bot and navigate to `BotFramework-Samples/SDKV4-Samples/dotnet_core/ComplexDialogBot` folder.
- Select `complex-dialog.bot` file.
# Further reading
- [Azure Bot Service](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Bot Storage](https://docs.microsoft.com/azure/bot-service/dotnet/bot-builder-dotnet-state?view=azure-bot-service-3.0&viewFallbackFrom=azure-bot-service-4.0)
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/Startup.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
/// <summary>
/// The Startup class configures services and the app's request pipeline.
/// </summary>
public class Startup
{
private ILoggerFactory _loggerFactory;
private bool _isProduction = false;
public Startup(IHostingEnvironment env)
{
_isProduction = env.IsProduction();
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
/// <summary>
/// Gets the configuration that represents a set of key/value application configuration properties.
/// </summary>
/// <value>
/// The <see cref="IConfiguration"/> that represents a set of key/value application configuration properties.
/// </value>
public IConfiguration Configuration { get; }
/// <summary>
/// This method gets called by the runtime. Use this method to add services to the container.
/// </summary>
/// <param name="services">Specifies the contract for a <see cref="IServiceCollection"/> of service descriptors.</param>
/// <seealso cref="IStatePropertyAccessor{T}"/>
/// <seealso cref="https://docs.microsoft.com/en-us/aspnet/web-api/overview/advanced/dependency-injection"/>
/// <seealso cref="https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0"/>
public void ConfigureServices(IServiceCollection services)
{
services.AddBot<ComplexDialogBot>(options =>
{
var secretKey = Configuration.GetSection("botFileSecret")?.Value;
var botFilePath = Configuration.GetSection("botFilePath")?.Value;
// Loads .bot configuration file and adds a singleton that your Bot can access through dependency injection.
var botConfig = BotConfiguration.Load(botFilePath ?? @".\complex-dialog.bot", secretKey);
services.AddSingleton(sp => botConfig ?? throw new InvalidOperationException($"The .bot configuration file could not be loaded. ({botConfig})"));
// Retrieve current endpoint.
var environment = _isProduction ? "production" : "development";
var service = botConfig.Services.FirstOrDefault(s => s.Type == "endpoint" && s.Name == environment);
if (!(service is EndpointService endpointService))
{
throw new InvalidOperationException($"The .bot file does not contain an endpoint with name '{environment}'.");
}
options.CredentialProvider = new SimpleCredentialProvider(endpointService.AppId, endpointService.AppPassword);
// Creates a logger for the application to use.
ILogger logger = _loggerFactory.CreateLogger<ComplexDialogBot>();
// Catches any errors that occur during a conversation turn and logs them.
options.OnTurnError = async (context, exception) =>
{
logger.LogError($"Exception caught : {exception}");
await context.SendActivityAsync("Sorry, it looks like something went wrong.");
};
});
// Create conversation and user state management objects, using memory storage.
IStorage dataStore = new MemoryStorage();
var conversationState = new ConversationState(dataStore);
var userState = new UserState(dataStore);
// Create and register state accessors.
// Accessors created here are passed into the IBot-derived class on every turn.
services.AddSingleton<ComplexDialogBotAccessors>(sp =>
{
// Create the custom state accessor.
// State accessors enable other components to read and write individual properties of state.
var accessors = new ComplexDialogBotAccessors(conversationState, userState)
{
DialogStateAccessor = conversationState.CreateProperty<DialogState>("DialogState"),
UserProfileAccessor = userState.CreateProperty<UserProfile>("UserProfile"),
};
return accessors;
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
_loggerFactory = loggerFactory;
app.UseDefaultFiles()
.UseStaticFiles()
.UseBotFramework();
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/UserProfile.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System.Collections.Generic;
/// <summary>Contains information about a user.</summary>
public class UserProfile
{
/// <summary>Gets or sets the user's name.</summary>
/// <value>The user's name.</value>
public string Name { get; set; }
/// <summary>Gets or sets the user's age.</summary>
/// <value>The user's age.</value>
public int Age { get; set; }
/// <summary>Gets or sets the list of companies the user wants to review.</summary>
/// <value>The list of companies the user wants to review.</value>
public List<string> CompaniesToReview { get; set; } = new List<string>();
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/appsettings.json
================================================
{
"botFilePath": "complex-dialog.bot",
"botFileSecret": ""
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/complex-dialog.bot
================================================
{
"name": "complex-dialog-bot",
"services": [
{
"type": "endpoint",
"name": "development",
"endpoint": "http://localhost:3978/api/messages",
"appId": "",
"appPassword": "",
"id": "24"
}
],
"padlock": "",
"version": "2.0"
}
================================================
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/wwwroot/default.htm
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Complex dialog sample</title>
<style>
body {
margin: 0px;
padding: 0px;
font-family: Segoe UI;
}
html,
body {
height: 100%;
}
header {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 4638.9 651.6' style='enable-background:new 0 0 4638.9 651.6;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%2355A0E0;%7D .st1%7Bfill:none;%7D .st2%7Bfill:%230058A8;%7D .st3%7Bfill:%23328BD8;%7D .st4%7Bfill:%23B6DCF1;%7D .st5%7Bopacity:0.2;fill:url(%23SVGID_1_);enable-background:new ;%7D%0A%3C/style%3E%3Crect y='1.1' class='st0' width='4640' height='646.3'/%3E%3Cpath class='st1' d='M3987.8,323.6L4310.3,1.1h-65.6l-460.1,460.1c-17.5,17.5-46.1,17.5-63.6,0L3260.9,1.1H0v646.3h3660.3 L3889,418.7c17.5-17.5,46.1-17.5,63.6,0l228.7,228.7h66.6l-260.2-260.2C3970.3,369.8,3970.3,341.1,3987.8,323.6z'/%3E%3Cpath class='st2' d='M3784.6,461.2L4244.7,1.1h-983.9l460.1,460.1C3738.4,478.7,3767.1,478.7,3784.6,461.2z'/%3E%3Cpath class='st3' d='M4640,1.1h-329.8l-322.5,322.5c-17.5,17.5-17.5,46.1,0,63.6l260.2,260.2H4640L4640,1.1L4640,1.1z'/%3E%3Cpath class='st4' d='M3889,418.8l-228.7,228.7h521.1l-228.7-228.7C3935.2,401.3,3906.5,401.3,3889,418.8z'/%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='3713.7576' y1='438.1175' x2='3911.4084' y2='14.2535' gradientTransform='matrix(1 0 0 -1 0 641.3969)'%3E%3Cstop offset='0' style='stop-color:%23FFFFFF;stop-opacity:0.5'/%3E%3Cstop offset='1' style='stop-color:%23FFFFFF'/%3E%3C/linearGradient%3E%3Cpath class='st5' d='M3952.7,124.5c-17.5-17.5-46.1-17.5-63.6,0l-523,523h1109.6L3952.7,124.5z'/%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
background-size: 100%;
background-position: right;
background-color: #55A0E0;
width: 100%;
font-size: 44px;
height: 120px;
color: white;
padding: 30px 0 40px 0px;
display: inline-block;
}
.header-icon {
background-image: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20150.2%20125%22%20style%3D%22enable-background%3Anew%200%200%20150.2%20125%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23FFFFFF%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.5%22%20class%3D%22st0%22%20width%3D%22149.7%22%20height%3D%22125%22/%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M59%2C102.9L21.8%2C66c-3.5-3.5-3.5-9.1%2C0-12.5l37-36.5l2.9%2C3l-37%2C36.4c-1.8%2C1.8-1.8%2C4.7%2C0%2C6.6l37.2%2C37L59%2C102.9z%22%0A%09%09/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M92.5%2C102.9l-3-3l37.2-37c0.9-0.9%2C1.4-2%2C1.4-3.3c0-1.2-0.5-2.4-1.4-3.3L89.5%2C20l2.9-3l37.2%2C36.4%0A%09%09c1.7%2C1.7%2C2.6%2C3.9%2C2.6%2C6.3s-0.9%2C4.6-2.6%2C6.3L92.5%2C102.9z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M90.1%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C98.1%2C64.7%2C94.4%2C68.4%2C90.1%2C68.4z%0A%09%09%20M90.1%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S91.9%2C56.5%2C90.1%2C56.5z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M61.4%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C69.5%2C64.7%2C65.8%2C68.4%2C61.4%2C68.4z%0A%09%09%20M61.4%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S63.3%2C56.5%2C61.4%2C56.5z%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
background-repeat: no-repeat;
float: left;
height: 140px;
width: 140px;
display: inline-block;
vertical-align: middle;
}
.header-text {
padding-left: 1%;
color: #FFFFFF;
font-family: "Segoe UI";
font-size: 72px;
font-weight: 300;
letter-spacing: 0.35px;
line-height: 96px;
display: inline-block;
vertical-align: middle;
}
.header-inner-container {
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
vertical-align: middle;
}
.header-inner-container::after {
content: "";
clear: both;
display: table;
}
.main-content-area {
padding-left: 30px;
}
.content-title {
color: #000000;
font-family: "Segoe UI";
font-size: 46px;
font-weight: 300;
line-height: 62px;
}
.main-text {
color: #808080;
font-size: 24px;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
}
.main-text-p1 {
padding-top: 48px;
padding-bottom: 28px;
}
.endpoint {
height: 32px;
width: 571px;
color: #808080;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
padding-top: 28px;
}
.how-to-build-section {
padding-top: 20px;
padding-left: 30px;
}
.how-to-build-section > h3 {
font-size: 16px;
font-weight: 600;
letter-spacing: 0.35px;
line-height: 22px;
margin: 0 0 24px 0;
text-transform: uppercase;
}
.step-container {
display: flex;
align-items: stretch;
position: relative;
}
.step-container dl {
border-left: 1px solid #A0A0A0;
display: block;
padding: 0 24px;
margin: 0;
}
.step-container dl > dt::before {
background-color: white;
border: 1px solid #A0A0A0;
border-radius: 100%;
content: '';
left: 47px;
height: 11px;
position: absolute;
width: 11px;
}
.step-container dl > .test-bullet::before {
background-color: blue;
}
.step-container dl > dt {
display: block;
font-size: inherit;
font-weight: bold;
line-height: 20px;
}
.step-container dl > dd {
font-size: inherit;
line-height: 20px;
margin-left: 0;
padding-bottom: 32px;
}
.step-container:last-child dl {
border-left: 1px solid transparent;
}
.ctaLink {
background-color: transparent;
border: 1px solid transparent;
color: #006AB1;
cursor: pointer;
font-weight: 600;
padding: 0;
white-space: normal;
}
.ctaLink:focus {
outline: 1px solid #00bcf2;
}
.ctaLink:hover {
text-decoration: underline;
}
.step-icon {
display: flex;
height: 38px;
margin-right: 15px;
width: 38px;
}
.step-icon > div {
height: 30px;
width: 30px;
background-repeat: no-repeat;
}
.ms-logo-container {
min-width: 580px;
max-width: 980px;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
transition: bottom 400ms;
}
.ms-logo {
float: right;
background-image: url("data:image/svg+xml;utf8,%0A%3Csvg%20version%3D%221.1%22%20id%3D%22MS-symbol%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20400%20120%22%20style%3D%22enable-background%3Anew%200%200%20400%20120%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23737474%3B%7D%0A%09.st2%7Bfill%3A%23D63F26%3B%7D%0A%09.st3%7Bfill%3A%23167D3E%3B%7D%0A%09.st4%7Bfill%3A%232E76BC%3B%7D%0A%09.st5%7Bfill%3A%23FDB813%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.6%22%20class%3D%22st0%22%20width%3D%22398.7%22%20height%3D%22119%22/%3E%0A%3Cpath%20class%3D%22st1%22%20d%3D%22M171.3%2C38.4v43.2h-7.5V47.7h-0.1l-13.4%2C33.9h-5l-13.7-33.9h-0.1v33.9h-6.9V38.4h10.8l12.4%2C32h0.2l13.1-32H171.3%0A%09z%20M177.6%2C41.7c0-1.2%2C0.4-2.2%2C1.3-3c0.9-0.8%2C1.9-1.2%2C3.1-1.2c1.3%2C0%2C2.4%2C0.4%2C3.2%2C1.3c0.8%2C0.8%2C1.3%2C1.8%2C1.3%2C3c0%2C1.2-0.4%2C2.2-1.3%2C3%0A%09c-0.9%2C0.8-1.9%2C1.2-3.2%2C1.2s-2.3-0.4-3.1-1.2C178%2C43.8%2C177.6%2C42.8%2C177.6%2C41.7z%20M185.7%2C50.6v31h-7.3v-31H185.7z%20M207.8%2C76.3%0A%09c1.1%2C0%2C2.3-0.3%2C3.6-0.8c1.3-0.5%2C2.5-1.2%2C3.6-2v6.8c-1.2%2C0.7-2.5%2C1.2-4%2C1.5c-1.5%2C0.3-3.1%2C0.5-4.9%2C0.5c-4.6%2C0-8.3-1.4-11.1-4.3%0A%09c-2.9-2.9-4.3-6.6-4.3-11c0-5%2C1.5-9.1%2C4.4-12.3c2.9-3.2%2C7-4.8%2C12.4-4.8c1.4%2C0%2C2.7%2C0.2%2C4.1%2C0.5c1.4%2C0.4%2C2.5%2C0.8%2C3.3%2C1.2v7%0A%09c-1.1-0.8-2.3-1.5-3.4-1.9c-1.2-0.5-2.4-0.7-3.6-0.7c-2.9%2C0-5.2%2C0.9-7%2C2.8c-1.8%2C1.9-2.7%2C4.4-2.7%2C7.6c0%2C3.1%2C0.8%2C5.6%2C2.5%2C7.3%0A%09C202.6%2C75.4%2C204.9%2C76.3%2C207.8%2C76.3z%20M235.7%2C50.1c0.6%2C0%2C1.1%2C0%2C1.6%2C0.1s0.9%2C0.2%2C1.2%2C0.3v7.4c-0.4-0.3-0.9-0.5-1.7-0.8%0A%09c-0.7-0.3-1.6-0.4-2.7-0.4c-1.8%2C0-3.3%2C0.8-4.5%2C2.3c-1.2%2C1.5-1.9%2C3.8-1.9%2C7v15.6h-7.3v-31h7.3v4.9h0.1c0.7-1.7%2C1.7-3%2C3-4%0A%09C232.2%2C50.6%2C233.8%2C50.1%2C235.7%2C50.1z%20M238.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3%0A%09c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5c-4.8%2C0-8.6-1.4-11.4-4.2C240.3%2C75.3%2C238.9%2C71.4%2C238.9%2C66.6z%0A%09%20M246.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5%0A%09c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7C247.2%2C60.5%2C246.5%2C63%2C246.5%2C66.3z%20M281.5%2C58.8c0%2C1%2C0.3%2C1.9%2C1%2C2.5%0A%09c0.7%2C0.6%2C2.1%2C1.3%2C4.4%2C2.2c2.9%2C1.2%2C5%2C2.5%2C6.1%2C3.9c1.2%2C1.5%2C1.8%2C3.2%2C1.8%2C5.3c0%2C2.9-1.1%2C5.3-3.4%2C7c-2.2%2C1.8-5.3%2C2.7-9.1%2C2.7%0A%09c-1.3%2C0-2.7-0.2-4.3-0.5c-1.6-0.3-2.9-0.7-4-1.2v-7.2c1.3%2C0.9%2C2.8%2C1.7%2C4.3%2C2.2c1.5%2C0.5%2C2.9%2C0.8%2C4.2%2C0.8c1.6%2C0%2C2.9-0.2%2C3.6-0.7%0A%09c0.8-0.5%2C1.2-1.2%2C1.2-2.3c0-1-0.4-1.9-1.2-2.5c-0.8-0.7-2.4-1.5-4.6-2.4c-2.7-1.1-4.6-2.4-5.7-3.8c-1.1-1.4-1.7-3.2-1.7-5.4%0A%09c0-2.8%2C1.1-5.1%2C3.3-6.9c2.2-1.8%2C5.1-2.7%2C8.6-2.7c1.1%2C0%2C2.3%2C0.1%2C3.6%2C0.4c1.3%2C0.2%2C2.5%2C0.6%2C3.4%2C0.9v6.9c-1-0.6-2.1-1.2-3.4-1.7%0A%09c-1.3-0.5-2.6-0.7-3.8-0.7c-1.4%2C0-2.5%2C0.3-3.2%2C0.8C281.9%2C57.1%2C281.5%2C57.8%2C281.5%2C58.8z%20M297.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2%0A%09c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5%0A%09c-4.8%2C0-8.6-1.4-11.4-4.2C299.4%2C75.3%2C297.9%2C71.4%2C297.9%2C66.6z%20M305.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6%0A%09c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7%0A%09C306.3%2C60.5%2C305.5%2C63%2C305.5%2C66.3z%20M353.9%2C56.6h-10.9v25h-7.4v-25h-5.2v-6h5.2v-4.3c0-3.3%2C1.1-5.9%2C3.2-8c2.1-2.1%2C4.8-3.1%2C8.1-3.1%0A%09c0.9%2C0%2C1.7%2C0%2C2.4%2C0.1c0.7%2C0.1%2C1.3%2C0.2%2C1.8%2C0.4V42c-0.2-0.1-0.7-0.3-1.3-0.5c-0.6-0.2-1.3-0.3-2.1-0.3c-1.5%2C0-2.7%2C0.5-3.5%2C1.4%0A%09s-1.2%2C2.4-1.2%2C4.2v3.7h10.9v-7l7.3-2.2v9.2h7.4v6h-7.4v14.5c0%2C1.9%2C0.3%2C3.3%2C1%2C4c0.7%2C0.8%2C1.8%2C1.2%2C3.3%2C1.2c0.4%2C0%2C0.9-0.1%2C1.5-0.3%0A%09c0.6-0.2%2C1.1-0.4%2C1.6-0.7v6c-0.5%2C0.3-1.2%2C0.5-2.3%2C0.7c-1.1%2C0.2-2.1%2C0.3-3.2%2C0.3c-3.1%2C0-5.4-0.8-6.9-2.5c-1.5-1.6-2.3-4.1-2.3-7.4%0A%09V56.6z%22/%3E%0A%3Cg%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2224%22%20class%3D%22st2%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2224%22%20class%3D%22st3%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2261.8%22%20class%3D%22st4%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2261.8%22%20class%3D%22st5%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
}
.ms-logo-container > div {
min-height: 60px;
width: 150px;
background-repeat: no-repeat;
}
.row {
padding: 90px 0px 0 20px;
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
}
.column {
float: left;
width: 45%;
padding-right: 20px;
}
.row:after {
content: "";
display: table;
clear: both;
}
a {
text-decoration: none;
}
.download-the-emulator {
height: 20px;
color: #0063B1;
font-size: 15px;
line-height: 20px;
padding-bottom: 70px;
}
.how-to-iframe {
max-width: 700px !important;
min-width: 650px !important;
height: 700px !important;
}
.remove-frame-height {
height: 10px;
}
@media only screen and (max-width: 1300px) {
.ms-logo {
padding-top: 30px;
}
.header-text {
font-size: 40x;
}
.column {
float: none;
padding-top: 30px;
width: 100%;
}
.ms-logo-container {
padding-top: 30px;
min-width: 480px;
max-width: 650px;
margin-left: auto;
margin-right: auto;
}
.row {
padding: 20px 0px 0 20px;
min-width: 480px;
max-width: 650px;
margin-left: auto;
margin-right: auto;
}
}
@media only screen and (max-width: 1370px) {
header {
background-color: #55A0E0;
background-size: auto 200px;
}
}
@media only screen and (max-width: 1230px) {
header {
background-color: #55A0E0;
background-size: auto 200px;
}
.header-text {
font-size: 44px;
}
.header-icon {
height: 120px;
width: 120px;
}
}
@media only screen and (max-width: 1000px) {
header {
background-color: #55A0E0;
background-image: none;
}
}
@media only screen and (max-width: 632px) {
.header-text {
font-size: 32px;
}
.row {
padding: 10px 0px 0 10px;
max-width: 490px !important;
min-width: 410px !important;
}
.endpoint {
font-size: 25px;
}
.main-text {
font-size: 20px;
}
.step-container dl > dd {
font-size: 14px;
}
.column {
padding-right: 5px;
}
.header-icon {
height: 110px;
width: 110px;
}
.how-to-iframe {
max-width: 480px !important;
min-width: 400px !important;
height: 650px !important;
overflow: hidden;
}
}
.remove-frame-height {
max-height: 10px;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
loadFrame();
});
var loadFrame = function () {
var iframe = document.createElement('iframe');
iframe.setAttribute("id", "iframe");
var offLineHTMLContent = "";
var frameElement = document.getElementById("how-to-iframe");
if (window.navigator.onLine) {
iframe.src = 'https://docs.botframework.com/static/abs/pages/f5.htm';
iframe.setAttribute("scrolling", "no");
iframe.setAttribute("frameborder", "0");
iframe.setAttribute("width", "100%");
iframe.setAttribute("height", "100%");
var frameDiv = document.getElementById("how-to-iframe");
frameDiv.appendChild(iframe);
} else {
frameElement.classList.add("remove-frame-height");
}
};
</script>
</head>
<body>
<header class="header">
<div class="header-inner-container">
<div class="header-icon" style="display: inline-block"></div>
<div class="header-text" style="display: inline-block">Complex Dialog Bot</div>
</div>
</header>
<div class="row">
<div class="column" class="main-content-area">
<div class="content-title">Your bot is ready!</div>
<div class="main-text main-text-p1">
You can test your bot in the Bot Framework Emulator<br />
by opening the .bot file in the project folder.
</div>
<div class="main-text download-the-emulator">
<a class="ctaLink" href="https://aka.ms/bot-framework-F5-download-emulator"
target="_blank">Download the Emulator</a>
</div>
<div class="main-text">
Visit <a class="ctaLink" href="https://aka.ms/bot-framework-F5-abs-home" target="_blank">
Azure
Bot Service
</a> to register your bot and add it to<br />
various channels. The bot's endpoint URL typically looks
like this:
</div>
<div class="endpoint">https://<i>your_bots_hostname</i>/api/messages</div>
</div>
<div class="column how-to-iframe" id="how-to-iframe"></div>
</div>
</div>
<div class="ms-logo-container">
<div class="ms-logo"></div>
</div>
</body>
</html>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/BotBuilder.ruleset
================================================
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1011" Action="None" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1129" Action="None" />
<Rule Id="SA1305" Action="Warning" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1412" Action="Warning" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1609" Action="Warning" />
<Rule Id="SA1633" Action="None" />
</Rules>
<Rules AnalyzerId="AsyncUsageAnalyzers" RuleNamespace="AsyncUsageAnalyzers">
<Rule Id="AvoidAsyncVoid" Action="Warning" />
</Rules>
</RuleSet>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DeploymentScripts/MsbotClone/bot.recipe
================================================
{
"version": "1.0",
"resources": [
{
"type": "endpoint",
"id": "24",
"name": "Sample",
"url": "http://localhost:3978/api/messages"
},
{
"type": "endpoint",
"id": "2",
"name": "production",
"url": "https://your-bot-url.azurewebsites.net/api/messages"
},
{
"type": "abs",
"id": "3",
"name": "complex-dialog-Bot"
},
{
"type": "appInsights",
"id": "4",
"name": "complex-dialog-Insights"
},
{
"type": "blob",
"id": "5",
"name": "complex-dialog-Blob",
"container": "botstatestore"
}
]
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Choices;
using Microsoft.Bot.Schema;
/// <summary>
/// Represents a bot that processes incoming activities.
/// For each user interaction, an instance of this class is created and the OnTurnAsync method is called.
/// This is a Transient lifetime service. Transient lifetime services are created
/// each time they're requested. For each Activity received, a new instance of this
/// class is created. Objects that are expensive to construct, or have a lifetime
/// beyond the single turn, should be carefully managed.
/// For example, the <see cref="MemoryStorage"/> object and associated
/// <see cref="IStatePropertyAccessor{T}"/> object are created with a singleton lifetime.
/// </summary>
/// <seealso cref="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.1"/>
public class DialogInterruptionsBot : IBot
{
// Define the company choices for the company selection prompt.
private static class Companies
{
public const string Adatum = "Adatum Corporation";
public const string Contoso = "Contoso Suites";
public const string Gdi = "Graphic Design Institute";
public const string Wwi = "Wide World Importers";
public static readonly IReadOnlyDictionary<string, string> Options
= new Dictionary<string, string>
{
{ Adatum, "A market research company" },
{ Contoso, "A chain of hotels and inns" },
{ Gdi, "A school for graphic design" },
{ Wwi, "An importer of consumer goods" },
};
public static string MoreInfo { get; } =
string.Join("\r\r", Options.Select(e => $"**{e.Key}**--{e.Value}"));
}
// Define interruptions for the conversation.
private static class Interruptions
{
// "Global" interruptions.
public const string Wait = "wait";
public const string Continue = "continue";
public const string Cancel = "cancel";
// "Local" interruptions (to the review selection process).
public const string Finish = "finish";
public const string MoreInfo = "more info";
public const string Help = "help";
public static readonly string[] LocalOptions = new string[]
{
Finish, MoreInfo, Help,
};
public static readonly IReadOnlyDictionary<string, string> Options
= new Dictionary<string, string>
{
{ Cancel, "Cancel the review sign-up process." },
{ Continue, "Continues the conversation on hold, if any." },
{ Finish, "Complete the review sign-up process with the currently selected companies." },
{ Help, "List the available commands." },
{ MoreInfo, "Display information about the companies." },
{ Wait, "Puts the current conversation on hold." },
};
/// <summary>Describes the available commands.</summary>
public static string HelpText { get; } =
string.Join("\r\r", Options.Select(e => $"**{e.Key}**--{e.Value}"));
}
private const string WelcomeText =
"Welcome to DialogInterruptionsBot." +
" This bot provides a complex conversation, supporting various kinds of interruptions." +
" Type anything to get started.";
private static string GlobalHelpText { get; } =
"This bot helps you sign up to review companies." +
$" To pause the conversation at any time, enter `{Interruptions.Wait}`." +
$" To resume the conversation, enter `{Interruptions.Continue}`.";
private const string CancellationText =
"We have cancelled your sign up. Thankyou.";
private static string OnHoldText { get; } =
"The conversation is on hold." +
$" Enter `{Interruptions.Continue}` to continue the conversation where you left off.";
// Define the dialog and prompt names for the bot.
private const string TopLevelDialog = "dialog-topLevel";
private const string ReviewSelectionDialog = "dialog-reviewSeleciton";
private const string OnHoldDialog = "dialog-onHold";
private const string NamePrompt = "prompt-name";
private const string AgePrompt = "prompt-age";
private const string SelectionPrompt = "prompt-companySlection";
// Define value names for values tracked inside the dialogs.
private const string UserInfo = "value-userInfo";
private const string CompaniesSelected = "value-companiesSelected";
/// <summary>
/// Contains the state property accessors and state management objects for the bot.
/// </summary>
private readonly DialogInterruptionsBotAccessors _accessors;
/// <summary>
/// The <see cref="DialogSet"/> that contains all the Dialogs that can be used at runtime.
/// </summary>
private readonly DialogSet _dialogs;
/// <summary>
/// Initializes a new instance of the <see cref="DialogInterruptionsBot"/> class.
/// </summary>
/// <param name="accessors">A class containing <see cref="IStatePropertyAccessor{T}"/> used to manage state.</param>
public DialogInterruptionsBot(DialogInterruptionsBotAccessors accessors)
{
_accessors = accessors ?? throw new ArgumentNullException(nameof(accessors));
// Create a dialog set for the bot. It requires a DialogState accessor, with which
// to retrieve the dialog state from the turn context.
_dialogs = new DialogSet(accessors.DialogStateAccessor);
// Add the prompts we need to the dialog set.
_dialogs
.Add(new TextPrompt(NamePrompt))
.Add(new NumberPrompt<int>(AgePrompt))
.Add(new ChoicePrompt(SelectionPrompt) { Style = ListStyle.List });
// Add the dialogs we need to the dialog set.
_dialogs.Add(new WaterfallDialog(TopLevelDialog)
.AddStep(NameStepAsync)
.AddStep(AgeStepAsync)
.AddStep(StartSelectionStepAsync)
.AddStep(AcknowledgementStepAsync));
_dialogs.Add(new WaterfallDialog(ReviewSelectionDialog)
.AddStep(SelectionStepAsync)
.AddStep(LoopStepAsync));
_dialogs.Add(new WaterfallDialog(OnHoldDialog)
.AddStep(OnHoldStepAsync)
.AddStep(ContinueToHoldStepAsync));
}
/// <summary>
/// Every conversation turn for our EchoBot will call this method.
/// </summary>
/// <param name="turnContext">A <see cref="ITurnContext"/> containing all the data needed
/// for processing this conversation turn. </param>
/// <param name="cancellationToken">(Optional) A <see cref="CancellationToken"/> that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> that represents the work queued to execute.</returns>
/// <seealso cref="BotStateSet"/>
/// <seealso cref="ConversationState"/>
/// <seealso cref="IMiddleware"/>
public async Task OnTurnAsync(
ITurnContext turnContext,
CancellationToken cancellationToken = default(CancellationToken))
{
if (turnContext == null)
{
throw new ArgumentNullException(nameof(turnContext));
}
// Handle Message activity type, which is the main activity type for shown within a conversational interface
// Message activities may contain text, speech, interactive cards, and binary or unknown attachments.
// see https://aka.ms/about-bot-activity-message to learn more about the message and other activity types
if (turnContext.Activity.Type == ActivityTypes.Message)
{
string input = turnContext.Activity.Text?.Trim();
// Handle any "global" interruptions before continuing.
// On a request for help, display global help.
if (string.Equals(input, Interruptions.Help, StringComparison.InvariantCultureIgnoreCase))
{
await turnContext.SendActivityAsync(GlobalHelpText, cancellationToken: cancellationToken);
return;
}
DialogContext dialogContext = await _dialogs.CreateContextAsync(turnContext, cancellationToken);
// If we're not currently on hold, check whether the user wants to go on hold.
if (dialogContext.ActiveDialog?.Id != OnHoldDialog)
{
if (string.Equals(input, Interruptions.Wait, StringComparison.InvariantCultureIgnoreCase))
{
// Transition onto hold.
await dialogContext.BeginDialogAsync(OnHoldDialog, null, cancellationToken);
await _accessors.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken);
return;
}
}
// On a request to cancel, clear the dialog stack completely.
if (string.Equals(input, Interruptions.Cancel, StringComparison.InvariantCultureIgnoreCase))
{
await dialogContext.CancelAllDialogsAsync(cancellationToken);
await turnContext.SendActivityAsync(CancellationText, cancellationToken: cancellationToken);
await _accessors.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken);
return;
}
// Run the DialogSet - let the framework identify the current state of the dialog from
// the dialog stack and figure out what (if any) is the active dialog.
DialogTurnResult results = await dialogContext.ContinueDialogAsync(cancellationToken);
switch (results.Status)
{
case DialogTurnStatus.Cancelled:
case DialogTurnStatus.Empty:
// If there is no active dialog, we should clear the user info and start a new dialog.
await _accessors.UserProfileAccessor.SetAsync(turnContext, new UserProfile(), cancellationToken);
await _accessors.UserState.SaveChangesAsync(turnContext, false, cancellationToken);
await dialogContext.BeginDialogAsync(TopLevelDialog, null, cancellationToken);
break;
case DialogTurnStatus.Complete:
// If we just finished the dialog, capture and display the results.
UserProfile userInfo = results.Result as UserProfile;
string status = "You are signed up to review "
+ (userInfo.CompaniesToReview.Count is 0 ? "no companies" : string.Join(" and ", userInfo.CompaniesToReview))
+ ".";
await turnContext.SendActivityAsync(status);
await _accessors.UserProfileAccessor.SetAsync(turnContext, userInfo, cancellationToken);
await _accessors.UserState.SaveChangesAsync(turnContext, false, cancellationToken);
break;
case DialogTurnStatus.Waiting:
// If there is an active dialog, we don't need to do anything here.
break;
}
await _accessors.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken);
}
// Processes ConversationUpdate Activities to welcome the user.
else if (turnContext.Activity.Type == ActivityTypes.ConversationUpdate)
{
if (turnContext.Activity.MembersAdded != null)
{
await SendWelcomeMessageAsync(turnContext, cancellationToken);
}
}
else
{
// Otherwise, note what type of unexpected activity we just received.
await turnContext.SendActivityAsync(
$"{turnContext.Activity.Type} event detected",
cancellationToken: cancellationToken);
}
}
/// <summary>
/// Sends a welcome message to the user.
/// </summary>
/// <param name="turnContext">A <see cref="ITurnContext"/> containing all the data needed
/// for processing this conversation turn. </param>
/// <param name="cancellationToken">(Optional) A <see cref="CancellationToken"/> that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> that represents the work queued to execute.</returns>
private static async Task SendWelcomeMessageAsync(
ITurnContext turnContext,
CancellationToken cancellationToken)
{
foreach (ChannelAccount member in turnContext.Activity.MembersAdded)
{
if (member.Id != turnContext.Activity.Recipient.Id)
{
Activity reply = turnContext.Activity.CreateReply();
reply.Text = WelcomeText;
await turnContext.SendActivityAsync(reply, cancellationToken);
}
}
}
/// <summary>The first step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> NameStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Create an object in which to collect the user's information within the dialog.
stepContext.Values[UserInfo] = new UserProfile();
Activity prompt = MessageFactory.Text("Please enter your name.");
// Ask the user to enter their name.
return await stepContext.PromptAsync(
NamePrompt,
new PromptOptions { Prompt = prompt, RetryPrompt = prompt },
cancellationToken);
}
/// <summary>The second step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> AgeStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's name to what they entered in response to the name prompt.
((UserProfile)stepContext.Values[UserInfo]).Name = (string)stepContext.Result;
Activity prompt = MessageFactory.Text("Please enter your age.");
// Ask the user to enter their age.
return await stepContext.PromptAsync(
AgePrompt,
new PromptOptions { Prompt = prompt, RetryPrompt = prompt },
cancellationToken);
}
/// <summary>The third step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> StartSelectionStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's age to what they entered in response to the age prompt.
int age = (int)stepContext.Result;
((UserProfile)stepContext.Values[UserInfo]).Age = age;
if (age < 25)
{
// If they are too young, skip the review selection dialog, and pass an empty list to the next step.
await stepContext.Context.SendActivityAsync(
MessageFactory.Text("You must be 25 or older to participate."),
cancellationToken);
return await stepContext.NextAsync(new List<string>(), cancellationToken);
}
else
{
// Otherwise, start the review selection dialog.
return await stepContext.BeginDialogAsync(ReviewSelectionDialog, null, cancellationToken);
}
}
/// <summary>The final step of the top-level dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> AcknowledgementStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Set the user's company selection to what they entered in the review-selection dialog.
List<string> list = stepContext.Result as List<string>;
var profile = (UserProfile)stepContext.Values[UserInfo];
profile.CompaniesToReview = list ?? new List<string>();
// Thank them for participating.
await stepContext.Context.SendActivityAsync(
MessageFactory.Text($"Thanks for participating, {profile.Name}."),
cancellationToken);
// Exit the dialog, returning the collected user information.
return await stepContext.EndDialogAsync(stepContext.Values[UserInfo], cancellationToken);
}
/// <summary>The first step of the review-selection dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> SelectionStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Continue using the same selection list, if any, from the previous iteration of this dialog.
List<string> list = stepContext.Options as List<string> ?? new List<string>();
stepContext.Values[CompaniesSelected] = list;
// Create a prompt message.
string message;
if (list.Count is 0)
{
message = $"Please choose a company to review:";
}
else
{
message = $"You have selected **{list[0]}**. You can review an additional company:";
}
// Create the list of options to choose from.
List<string> options = Companies.Options.Keys.ToList();
options.AddRange(Interruptions.LocalOptions);
if (list.Count > 0)
{
options.Remove(list[0]);
}
// Prompt the user for a choice.
return await stepContext.PromptAsync(
SelectionPrompt,
new PromptOptions
{
Prompt = MessageFactory.Text(message),
RetryPrompt = MessageFactory.Text("Please choose an option from the list."),
Choices = ChoiceFactory.ToChoices(options),
},
cancellationToken);
}
/// <summary>The final step of the review-selection dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> LoopStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Retrieve their selection list and the choice they juat made.
List<string> list = stepContext.Values[CompaniesSelected] as List<string>;
FoundChoice choice = (FoundChoice)stepContext.Result;
// Handle any local, expected interruptions appropriately.
switch (choice.Value)
{
case Interruptions.Finish:
// Exit and return their current selection list.
return await stepContext.EndDialogAsync(list, cancellationToken);
case Interruptions.Cancel:
// Exit and return null.
return await stepContext.EndDialogAsync(null, cancellationToken);
case Interruptions.Help:
// Dispaly the help options.
await stepContext.Context.SendActivityAsync(
Interruptions.HelpText,
cancellationToken: cancellationToken);
break;
case Interruptions.MoreInfo:
// Display more information about the companies.
await stepContext.Context.SendActivityAsync(
Companies.MoreInfo,
cancellationToken: cancellationToken);
break;
default:
// If they chose a company, add it to the list.
list.Add(choice.Value);
break;
}
if (list.Count is 2)
{
// If they've selected 2 companies to review, exit and return their list.
return await stepContext.EndDialogAsync(list, cancellationToken);
}
else
{
// Otherwise, repeat this dialog, passing in the list from this iteration.
return await stepContext.ReplaceDialogAsync(ReviewSelectionDialog, list, cancellationToken);
}
}
/// <summary>The first step of the on-hold dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> OnHoldStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
string input = stepContext.Context.Activity.Text?.Trim();
if (string.Equals(input, Interruptions.Continue, StringComparison.InvariantCultureIgnoreCase))
{
// Exit and return to the last active dialog state.
return await stepContext.EndDialogAsync(null, cancellationToken);
}
else
{
// Send a status message and let the dialog contnue on the next turn.
await stepContext.Context.SendActivityAsync(OnHoldText, cancellationToken: cancellationToken);
return Dialog.EndOfTurn;
}
}
/// <summary>The last step of the on-hold dialog.</summary>
/// <param name="stepContext">The waterfall step context for the current turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains a <see cref="DialogTurnResult"/> to
/// communicate some flow control back to the containing WaterfallDialog.</remarks>
private static async Task<DialogTurnResult> ContinueToHoldStepAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Restart the on-hold dialog.
return await stepContext.ReplaceDialogAsync(OnHoldDialog, null, cancellationToken);
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<CodeAnalysisRuleSet>BotBuilder.ruleset</CodeAnalysisRuleSet>
<RootNamespace>Microsoft.BotBuilderSamples</RootNamespace>
</PropertyGroup>
<ItemGroup>
<None Update="*.bot">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.1.5" />
<PackageReference Include="Microsoft.Bot.Configuration" Version="4.1.5" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta008" PrivateAssets="all" />
</ItemGroup>
</Project>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBotAccessors.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
/// <summary>
/// This class is created as a Singleton and passed into the IBot-derived constructor.
/// - See <see cref="DialogInterruptionsBot"/> constructor for how that is injected.
/// - See the Startup.cs file for more details on creating the Singleton that gets
/// injected into the constructor.
/// </summary>
public class DialogInterruptionsBotAccessors
{
/// <summary>
/// Initializes a new instance of the <see cref="DialogInterruptionsBotAccessors"/> class.
/// Contains the <see cref="ConversationState"/> and associated <see cref="IStatePropertyAccessor{T}"/>.
/// </summary>
/// <param name="conversationState">The state object that stores the dialog state.</param>
/// <param name="userState">The state object that stores the user state.</param>
public DialogInterruptionsBotAccessors(ConversationState conversationState, UserState userState)
{
ConversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState));
UserState = userState ?? throw new ArgumentNullException(nameof(userState));
}
/// <summary>
/// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for ConversationDialogState.
/// </summary>
/// <value>
/// The accessor stores the dialog state for the conversation.
/// </value>
public IStatePropertyAccessor<DialogState> DialogStateAccessor { get; set; }
/// <summary>
/// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for CounterState.
/// </summary>
/// <value>
/// The accessor stores user data.
/// </value>
public IStatePropertyAccessor<UserProfile> UserProfileAccessor { get; set; }
/// <summary>
/// Gets the <see cref="ConversationState"/> object for the conversation.
/// </summary>
/// <value>The <see cref="ConversationState"/> object.</value>
public ConversationState ConversationState { get; }
/// <summary>
/// Gets the <see cref="UserState"/> object for the conversation.
/// </summary>
/// <value>The <see cref="UserState"/> object.</value>
public UserState UserState { get; }
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Program.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace Microsoft.BotBuilderSamples
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureLogging((hostingContext, logging) =>
{
// Add Azure Logging
logging.AddAzureWebAppDiagnostics();
// Logging Options.
// There are other logging options available:
// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1
// logging.AddDebug();
// logging.AddConsole();
})
// Logging Options.
// Consider using Application Insights for your logging and metrics needs.
// https://azure.microsoft.com/en-us/services/application-insights/
// .UseApplicationInsights()
.UseStartup<Startup>()
.Build();
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Properties/launchSettings.json
================================================
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3978/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"DialogInterruptions_Sample": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:3978/"
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/README.md
================================================
This sample creates a dialog-based conversation that can be interrupted in various ways in ASP.Net Core 2.
# To try this sample
- Clone the samples repository
```bash
git clone https://github.com/Microsoft/BotFramework-Samples.git
```
- [Optional] Update the `appsettings.json` file under `BotFramework-Samples/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/` with your botFileSecret.
For Azure Bot Service bots, you can find the botFileSecret under application settings.
# Running Locally
## Visual Studio
- Navigate to the samples folder (`BotFramework-Samples/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/`) and open DialogInterruptionsBot.csproj in Visual Studio.
- Run the project (press `F5` key).
## .NET Core CLI
- Install the [.NET Core CLI tools](https://docs.microsoft.com/dotnet/core/tools/?tabs=netcore2x).
- Using the command line, navigate to `BotFramework-Samples/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/` folder.
- Type `dotnet run`.
## Testing the bot using Bot Framework Emulator
[Microsoft Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot
developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the Bot Framework emulator from [here](https://aka.ms/botframeworkemulator).
## Connect to bot using Bot Framework Emulator **V4**
- Launch the Bot Framework Emulator.
- File -> Open bot and navigate to `BotFramework-Samples/SDKV4-Samples/dotnet_core/DialogInterruptionsBot` folder.
- Select `complex-dialog.bot` file.
# Further reading
- [Azure Bot Service](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Bot Storage](https://docs.microsoft.com/azure/bot-service/dotnet/bot-builder-dotnet-state?view=azure-bot-service-3.0&viewFallbackFrom=azure-bot-service-4.0)
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Startup.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
/// <summary>
/// The Startup class configures services and the app's request pipeline.
/// </summary>
public class Startup
{
private ILoggerFactory _loggerFactory;
private bool _isProduction = false;
public Startup(IHostingEnvironment env)
{
_isProduction = env.IsProduction();
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
/// <summary>
/// Gets the configuration that represents a set of key/value application configuration properties.
/// </summary>
/// <value>
/// The <see cref="IConfiguration"/> that represents a set of key/value application configuration properties.
/// </value>
public IConfiguration Configuration { get; }
/// <summary>
/// This method gets called by the runtime. Use this method to add services to the container.
/// </summary>
/// <param name="services">Specifies the contract for a <see cref="IServiceCollection"/> of service descriptors.</param>
/// <seealso cref="IStatePropertyAccessor{T}"/>
/// <seealso cref="https://docs.microsoft.com/en-us/aspnet/web-api/overview/advanced/dependency-injection"/>
/// <seealso cref="https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0"/>
public void ConfigureServices(IServiceCollection services)
{
services.AddBot<DialogInterruptionsBot>(options =>
{
var secretKey = Configuration.GetSection("botFileSecret")?.Value;
var botFilePath = Configuration.GetSection("botFilePath")?.Value;
// Loads .bot configuration file and adds a singleton that your Bot can access through dependency injection.
var botConfig = BotConfiguration.Load(botFilePath ?? @".\complex-dialog.bot", secretKey);
services.AddSingleton(sp => botConfig ?? throw new InvalidOperationException($"The .bot configuration file could not be loaded. ({botConfig})"));
// Retrieve current endpoint.
var environment = _isProduction ? "production" : "development";
var service = botConfig.Services.FirstOrDefault(s => s.Type == "endpoint" && s.Name == environment);
if (!(service is EndpointService endpointService))
{
throw new InvalidOperationException($"The .bot file does not contain an endpoint with name '{environment}'.");
}
options.CredentialProvider = new SimpleCredentialProvider(endpointService.AppId, endpointService.AppPassword);
// Creates a logger for the application to use.
ILogger logger = _loggerFactory.CreateLogger<DialogInterruptionsBot>();
// Catches any errors that occur during a conversation turn and logs them.
options.OnTurnError = async (context, exception) =>
{
logger.LogError($"Exception caught : {exception}");
await context.SendActivityAsync("Sorry, it looks like something went wrong.");
};
});
// Create conversation and user state management objects, using memory storage.
IStorage dataStore = new MemoryStorage();
var conversationState = new ConversationState(dataStore);
var userState = new UserState(dataStore);
// Create and register state accessors.
// Accessors created here are passed into the IBot-derived class on every turn.
services.AddSingleton<DialogInterruptionsBotAccessors>(sp =>
{
// Create the custom state accessor.
// State accessors enable other components to read and write individual properties of state.
var accessors = new DialogInterruptionsBotAccessors(conversationState, userState)
{
DialogStateAccessor = conversationState.CreateProperty<DialogState>("DialogState"),
UserProfileAccessor = userState.CreateProperty<UserProfile>("UserProfile"),
};
return accessors;
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
_loggerFactory = loggerFactory;
app.UseDefaultFiles()
.UseStaticFiles()
.UseBotFramework();
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/UserProfile.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.BotBuilderSamples
{
using System.Collections.Generic;
/// <summary>Contains information about a user.</summary>
public class UserProfile
{
/// <summary>Gets or sets the user's name.</summary>
/// <value>The user's name.</value>
public string Name { get; set; }
/// <summary>Gets or sets the user's age.</summary>
/// <value>The user's age.</value>
public int Age { get; set; }
/// <summary>Gets or sets the list of companies the user wants to review.</summary>
/// <value>The list of companies the user wants to review.</value>
public List<string> CompaniesToReview { get; set; } = new List<string>();
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/appsettings.json
================================================
{
"botFilePath": "dialog-interruptions.bot",
"botFileSecret": ""
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/dialog-interruptions.bot
================================================
{
"name": "dialog-interruptions-bot",
"services": [
{
"type": "endpoint",
"name": "development",
"endpoint": "http://localhost:3978/api/messages",
"appId": "",
"appPassword": "",
"id": "24"
}
],
"padlock": "",
"version": "2.0"
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/wwwroot/default.htm
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dialog with interruptions sample</title>
<style>
body {
margin: 0px;
padding: 0px;
font-family: Segoe UI;
}
html,
body {
height: 100%;
}
header {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 4638.9 651.6' style='enable-background:new 0 0 4638.9 651.6;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%2355A0E0;%7D .st1%7Bfill:none;%7D .st2%7Bfill:%230058A8;%7D .st3%7Bfill:%23328BD8;%7D .st4%7Bfill:%23B6DCF1;%7D .st5%7Bopacity:0.2;fill:url(%23SVGID_1_);enable-background:new ;%7D%0A%3C/style%3E%3Crect y='1.1' class='st0' width='4640' height='646.3'/%3E%3Cpath class='st1' d='M3987.8,323.6L4310.3,1.1h-65.6l-460.1,460.1c-17.5,17.5-46.1,17.5-63.6,0L3260.9,1.1H0v646.3h3660.3 L3889,418.7c17.5-17.5,46.1-17.5,63.6,0l228.7,228.7h66.6l-260.2-260.2C3970.3,369.8,3970.3,341.1,3987.8,323.6z'/%3E%3Cpath class='st2' d='M3784.6,461.2L4244.7,1.1h-983.9l460.1,460.1C3738.4,478.7,3767.1,478.7,3784.6,461.2z'/%3E%3Cpath class='st3' d='M4640,1.1h-329.8l-322.5,322.5c-17.5,17.5-17.5,46.1,0,63.6l260.2,260.2H4640L4640,1.1L4640,1.1z'/%3E%3Cpath class='st4' d='M3889,418.8l-228.7,228.7h521.1l-228.7-228.7C3935.2,401.3,3906.5,401.3,3889,418.8z'/%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='3713.7576' y1='438.1175' x2='3911.4084' y2='14.2535' gradientTransform='matrix(1 0 0 -1 0 641.3969)'%3E%3Cstop offset='0' style='stop-color:%23FFFFFF;stop-opacity:0.5'/%3E%3Cstop offset='1' style='stop-color:%23FFFFFF'/%3E%3C/linearGradient%3E%3Cpath class='st5' d='M3952.7,124.5c-17.5-17.5-46.1-17.5-63.6,0l-523,523h1109.6L3952.7,124.5z'/%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
background-size: 100%;
background-position: right;
background-color: #55A0E0;
width: 100%;
font-size: 44px;
height: 120px;
color: white;
padding: 30px 0 40px 0px;
display: inline-block;
}
.header-icon {
background-image: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20150.2%20125%22%20style%3D%22enable-background%3Anew%200%200%20150.2%20125%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23FFFFFF%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.5%22%20class%3D%22st0%22%20width%3D%22149.7%22%20height%3D%22125%22/%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M59%2C102.9L21.8%2C66c-3.5-3.5-3.5-9.1%2C0-12.5l37-36.5l2.9%2C3l-37%2C36.4c-1.8%2C1.8-1.8%2C4.7%2C0%2C6.6l37.2%2C37L59%2C102.9z%22%0A%09%09/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M92.5%2C102.9l-3-3l37.2-37c0.9-0.9%2C1.4-2%2C1.4-3.3c0-1.2-0.5-2.4-1.4-3.3L89.5%2C20l2.9-3l37.2%2C36.4%0A%09%09c1.7%2C1.7%2C2.6%2C3.9%2C2.6%2C6.3s-0.9%2C4.6-2.6%2C6.3L92.5%2C102.9z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M90.1%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C98.1%2C64.7%2C94.4%2C68.4%2C90.1%2C68.4z%0A%09%09%20M90.1%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S91.9%2C56.5%2C90.1%2C56.5z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M61.4%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C69.5%2C64.7%2C65.8%2C68.4%2C61.4%2C68.4z%0A%09%09%20M61.4%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S63.3%2C56.5%2C61.4%2C56.5z%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
background-repeat: no-repeat;
float: left;
height: 140px;
width: 140px;
display: inline-block;
vertical-align: middle;
}
.header-text {
padding-left: 1%;
color: #FFFFFF;
font-family: "Segoe UI";
font-size: 72px;
font-weight: 300;
letter-spacing: 0.35px;
line-height: 96px;
display: inline-block;
vertical-align: middle;
}
.header-inner-container {
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
vertical-align: middle;
}
.header-inner-container::after {
content: "";
clear: both;
display: table;
}
.main-content-area {
padding-left: 30px;
}
.content-title {
color: #000000;
font-family: "Segoe UI";
font-size: 46px;
font-weight: 300;
line-height: 62px;
}
.main-text {
color: #808080;
font-size: 24px;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
}
.main-text-p1 {
padding-top: 48px;
padding-bottom: 28px;
}
.endpoint {
height: 32px;
width: 571px;
color: #808080;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
padding-top: 28px;
}
.how-to-build-section {
padding-top: 20px;
padding-left: 30px;
}
.how-to-build-section > h3 {
font-size: 16px;
font-weight: 600;
letter-spacing: 0.35px;
line-height: 22px;
margin: 0 0 24px 0;
text-transform: uppercase;
}
.step-container {
display: flex;
align-items: stretch;
position: relative;
}
.step-container dl {
border-left: 1px solid #A0A0A0;
display: block;
padding: 0 24px;
margin: 0;
}
.step-container dl > dt::before {
background-color: white;
border: 1px solid #A0A0A0;
border-radius: 100%;
content: '';
left: 47px;
height: 11px;
position: absolute;
width: 11px;
}
.step-container dl > .test-bullet::before {
background-color: blue;
}
.step-container dl > dt {
display: block;
font-size: inherit;
font-weight: bold;
line-height: 20px;
}
.step-container dl > dd {
font-size: inherit;
line-height: 20px;
margin-left: 0;
padding-bottom: 32px;
}
.step-container:last-child dl {
border-left: 1px solid transparent;
}
.ctaLink {
background-color: transparent;
border: 1px solid transparent;
color: #006AB1;
cursor: pointer;
font-weight: 600;
padding: 0;
white-space: normal;
}
.ctaLink:focus {
outline: 1px solid #00bcf2;
}
.ctaLink:hover {
text-decoration: underline;
}
.step-icon {
display: flex;
height: 38px;
margin-right: 15px;
width: 38px;
}
.step-icon > div {
height: 30px;
width: 30px;
background-repeat: no-repeat;
}
.ms-logo-container {
min-width: 580px;
max-width: 980px;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
transition: bottom 400ms;
}
.ms-logo {
float: right;
background-image: url("data:image/svg+xml;utf8,%0A%3Csvg%20version%3D%221.1%22%20id%3D%22MS-symbol%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20400%20120%22%20style%3D%22enable-background%3Anew%200%200%20400%20120%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23737474%3B%7D%0A%09.st2%7Bfill%3A%23D63F26%3B%7D%0A%09.st3%7Bfill%3A%23167D3E%3B%7D%0A%09.st4%7Bfill%3A%232E76BC%3B%7D%0A%09.st5%7Bfill%3A%23FDB813%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.6%22%20class%3D%22st0%22%20width%3D%22398.7%22%20height%3D%22119%22/%3E%0A%3Cpath%20class%3D%22st1%22%20d%3D%22M171.3%2C38.4v43.2h-7.5V47.7h-0.1l-13.4%2C33.9h-5l-13.7-33.9h-0.1v33.9h-6.9V38.4h10.8l12.4%2C32h0.2l13.1-32H171.3%0A%09z%20M177.6%2C41.7c0-1.2%2C0.4-2.2%2C1.3-3c0.9-0.8%2C1.9-1.2%2C3.1-1.2c1.3%2C0%2C2.4%2C0.4%2C3.2%2C1.3c0.8%2C0.8%2C1.3%2C1.8%2C1.3%2C3c0%2C1.2-0.4%2C2.2-1.3%2C3%0A%09c-0.9%2C0.8-1.9%2C1.2-3.2%2C1.2s-2.3-0.4-3.1-1.2C178%2C43.8%2C177.6%2C42.8%2C177.6%2C41.7z%20M185.7%2C50.6v31h-7.3v-31H185.7z%20M207.8%2C76.3%0A%09c1.1%2C0%2C2.3-0.3%2C3.6-0.8c1.3-0.5%2C2.5-1.2%2C3.6-2v6.8c-1.2%2C0.7-2.5%2C1.2-4%2C1.5c-1.5%2C0.3-3.1%2C0.5-4.9%2C0.5c-4.6%2C0-8.3-1.4-11.1-4.3%0A%09c-2.9-2.9-4.3-6.6-4.3-11c0-5%2C1.5-9.1%2C4.4-12.3c2.9-3.2%2C7-4.8%2C12.4-4.8c1.4%2C0%2C2.7%2C0.2%2C4.1%2C0.5c1.4%2C0.4%2C2.5%2C0.8%2C3.3%2C1.2v7%0A%09c-1.1-0.8-2.3-1.5-3.4-1.9c-1.2-0.5-2.4-0.7-3.6-0.7c-2.9%2C0-5.2%2C0.9-7%2C2.8c-1.8%2C1.9-2.7%2C4.4-2.7%2C7.6c0%2C3.1%2C0.8%2C5.6%2C2.5%2C7.3%0A%09C202.6%2C75.4%2C204.9%2C76.3%2C207.8%2C76.3z%20M235.7%2C50.1c0.6%2C0%2C1.1%2C0%2C1.6%2C0.1s0.9%2C0.2%2C1.2%2C0.3v7.4c-0.4-0.3-0.9-0.5-1.7-0.8%0A%09c-0.7-0.3-1.6-0.4-2.7-0.4c-1.8%2C0-3.3%2C0.8-4.5%2C2.3c-1.2%2C1.5-1.9%2C3.8-1.9%2C7v15.6h-7.3v-31h7.3v4.9h0.1c0.7-1.7%2C1.7-3%2C3-4%0A%09C232.2%2C50.6%2C233.8%2C50.1%2C235.7%2C50.1z%20M238.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3%0A%09c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5c-4.8%2C0-8.6-1.4-11.4-4.2C240.3%2C75.3%2C238.9%2C71.4%2C238.9%2C66.6z%0A%09%20M246.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5%0A%09c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7C247.2%2C60.5%2C246.5%2C63%2C246.5%2C66.3z%20M281.5%2C58.8c0%2C1%2C0.3%2C1.9%2C1%2C2.5%0A%09c0.7%2C0.6%2C2.1%2C1.3%2C4.4%2C2.2c2.9%2C1.2%2C5%2C2.5%2C6.1%2C3.9c1.2%2C1.5%2C1.8%2C3.2%2C1.8%2C5.3c0%2C2.9-1.1%2C5.3-3.4%2C7c-2.2%2C1.8-5.3%2C2.7-9.1%2C2.7%0A%09c-1.3%2C0-2.7-0.2-4.3-0.5c-1.6-0.3-2.9-0.7-4-1.2v-7.2c1.3%2C0.9%2C2.8%2C1.7%2C4.3%2C2.2c1.5%2C0.5%2C2.9%2C0.8%2C4.2%2C0.8c1.6%2C0%2C2.9-0.2%2C3.6-0.7%0A%09c0.8-0.5%2C1.2-1.2%2C1.2-2.3c0-1-0.4-1.9-1.2-2.5c-0.8-0.7-2.4-1.5-4.6-2.4c-2.7-1.1-4.6-2.4-5.7-3.8c-1.1-1.4-1.7-3.2-1.7-5.4%0A%09c0-2.8%2C1.1-5.1%2C3.3-6.9c2.2-1.8%2C5.1-2.7%2C8.6-2.7c1.1%2C0%2C2.3%2C0.1%2C3.6%2C0.4c1.3%2C0.2%2C2.5%2C0.6%2C3.4%2C0.9v6.9c-1-0.6-2.1-1.2-3.4-1.7%0A%09c-1.3-0.5-2.6-0.7-3.8-0.7c-1.4%2C0-2.5%2C0.3-3.2%2C0.8C281.9%2C57.1%2C281.5%2C57.8%2C281.5%2C58.8z%20M297.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2%0A%09c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5%0A%09c-4.8%2C0-8.6-1.4-11.4-4.2C299.4%2C75.3%2C297.9%2C71.4%2C297.9%2C66.6z%20M305.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6%0A%09c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7%0A%09C306.3%2C60.5%2C305.5%2C63%2C305.5%2C66.3z%20M353.9%2C56.6h-10.9v25h-7.4v-25h-5.2v-6h5.2v-4.3c0-3.3%2C1.1-5.9%2C3.2-8c2.1-2.1%2C4.8-3.1%2C8.1-3.1%0A%09c0.9%2C0%2C1.7%2C0%2C2.4%2C0.1c0.7%2C0.1%2C1.3%2C0.2%2C1.8%2C0.4V42c-0.2-0.1-0.7-0.3-1.3-0.5c-0.6-0.2-1.3-0.3-2.1-0.3c-1.5%2C0-2.7%2C0.5-3.5%2C1.4%0A%09s-1.2%2C2.4-1.2%2C4.2v3.7h10.9v-7l7.3-2.2v9.2h7.4v6h-7.4v14.5c0%2C1.9%2C0.3%2C3.3%2C1%2C4c0.7%2C0.8%2C1.8%2C1.2%2C3.3%2C1.2c0.4%2C0%2C0.9-0.1%2C1.5-0.3%0A%09c0.6-0.2%2C1.1-0.4%2C1.6-0.7v6c-0.5%2C0.3-1.2%2C0.5-2.3%2C0.7c-1.1%2C0.2-2.1%2C0.3-3.2%2C0.3c-3.1%2C0-5.4-0.8-6.9-2.5c-1.5-1.6-2.3-4.1-2.3-7.4%0A%09V56.6z%22/%3E%0A%3Cg%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2224%22%20class%3D%22st2%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2224%22%20class%3D%22st3%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2261.8%22%20class%3D%22st4%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2261.8%22%20class%3D%22st5%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
}
.ms-logo-container > div {
min-height: 60px;
width: 150px;
background-repeat: no-repeat;
}
.row {
padding: 90px 0px 0 20px;
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
}
.column {
float: left;
width: 45%;
padding-right: 20px;
}
.row:after {
content: "";
display: table;
clear: both;
}
a {
text-decoration: none;
}
.download-the-emulator {
height: 20px;
color: #0063B1;
font-size: 15px;
line-height: 20px;
padding-bottom: 70px;
}
.how-to-iframe {
max-width: 700px !important;
min-width: 650px !important;
height: 700px !important;
}
.remove-frame-height {
height: 10px;
}
@media only screen and (max-width: 1300px) {
.ms-logo {
padding-top: 30px;
}
.header-text {
font-size: 40x;
}
.column {
float: none;
padding-top: 30px;
width: 100%;
}
.ms-logo-container {
padding-top: 30px;
min-width: 480px;
max-width: 650px;
margin-left: auto;
margin-right: auto;
}
.row {
padding: 20px 0px 0 20px;
min-width: 480px;
max-width: 650px;
margin-left: auto;
margin-right: auto;
}
}
@media only screen and (max-width: 1370px) {
header {
background-color: #55A0E0;
background-size: auto 200px;
}
}
@media only screen and (max-width: 1230px) {
header {
background-color: #55A0E0;
background-size: auto 200px;
}
.header-text {
font-size: 44px;
}
.header-icon {
height: 120px;
width: 120px;
}
}
@media only screen and (max-width: 1000px) {
header {
background-color: #55A0E0;
background-image: none;
}
}
@media only screen and (max-width: 632px) {
.header-text {
font-size: 32px;
}
.row {
padding: 10px 0px 0 10px;
max-width: 490px !important;
min-width: 410px !important;
}
.endpoint {
font-size: 25px;
}
.main-text {
font-size: 20px;
}
.step-container dl > dd {
font-size: 14px;
}
.column {
padding-right: 5px;
}
.header-icon {
height: 110px;
width: 110px;
}
.how-to-iframe {
max-width: 480px !important;
min-width: 400px !important;
height: 650px !important;
overflow: hidden;
}
}
.remove-frame-height {
max-height: 10px;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
loadFrame();
});
var loadFrame = function () {
var iframe = document.createElement('iframe');
iframe.setAttribute("id", "iframe");
var offLineHTMLContent = "";
var frameElement = document.getElementById("how-to-iframe");
if (window.navigator.onLine) {
iframe.src = 'https://docs.botframework.com/static/abs/pages/f5.htm';
iframe.setAttribute("scrolling", "no");
iframe.setAttribute("frameborder", "0");
iframe.setAttribute("width", "100%");
iframe.setAttribute("height", "100%");
var frameDiv = document.getElementById("how-to-iframe");
frameDiv.appendChild(iframe);
} else {
frameElement.classList.add("remove-frame-height");
}
};
</script>
</head>
<body>
<header class="header">
<div class="header-inner-container">
<div class="header-icon" style="display: inline-block"></div>
<div class="header-text" style="display: inline-block">Dialog with Interruptions Bot</div>
</div>
</header>
<div class="row">
<div class="column" class="main-content-area">
<div class="content-title">Your bot is ready!</div>
<div class="main-text main-text-p1">
You can test your bot in the Bot Framework Emulator<br />
by opening the .bot file in the project folder.
</div>
<div class="main-text download-the-emulator">
<a class="ctaLink" href="https://aka.ms/bot-framework-F5-download-emulator"
target="_blank">Download the Emulator</a>
</div>
<div class="main-text">
Visit <a class="ctaLink" href="https://aka.ms/bot-framework-F5-abs-home" target="_blank">
Azure
Bot Service
</a> to register your bot and add it to<br />
various channels. The bot's endpoint URL typically looks
like this:
</div>
<div class="endpoint">https://<i>your_bots_hostname</i>/api/messages</div>
</div>
<div class="column how-to-iframe" id="how-to-iframe"></div>
</div>
</div>
<div class="ms-logo-container">
<div class="ms-logo"></div>
</div>
</body>
</html>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DeploymentScripts/MsbotClone/bot.recipe
================================================
{
"version": "1.0",
"resources": [
{
"type": "endpoint",
"id": "1",
"name": "development",
"url": "http://localhost:3978/api/messages"
},
{
"type": "endpoint",
"id": "2",
"name": "production",
"url": "https://your-bot-url.azurewebsites.net/api/messages"
},
{
"type": "abs",
"id": "3",
"name": "DialogPromptBot-abs"
},
{
"type": "appInsights",
"id": "4",
"name": "DialogPromptBot-insights"
},
{
"type": "blob",
"id": "5",
"name": "DialogPromptBot-blob",
"container": "botstatestore"
}
]
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Choices;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Logging;
namespace Microsoft.BotBuilderSamples
{
/// <summary>
/// Represents a bot that processes incoming activities.
/// For each user interaction, an instance of this class is created and the OnTurnAsync method
/// is called. This is a Transient lifetime service. Transient lifetime services are created
/// each time they're requested. For each Activity received, a new instance of this class is
/// created. Objects that are expensive to construct, or have a lifetime beyond the single
/// turn, should be carefully managed. For example, the <see cref="MemoryStorage"/> object and
/// associated <see cref="IStatePropertyAccessor{T}"/> object are created with a singleton lifetime.
/// </summary>
public class DialogPromptBot : IBot
{
// Define identifiers for our dialogs and prompts.
private const string ReservationDialog = "reservationDialog";
private const string SizeRangePrompt = "sizeRangePrompt";
private const string LocationPrompt = "locationPrompt";
private const string ReservationDatePrompt = "reservationDatePrompt";
// Define keys for tracked values within the dialog.
private const string LocationKey = "location";
private const string PartySizeKey = "partySize";
private readonly DialogSet _dialogSet;
private readonly DialogPromptBotAccessors _accessors;
private readonly ILogger _logger;
/// <summary>
/// Initializes a new instance of the <see cref="DialogPromptBot"/> class.
/// </summary>
/// <param name="accessors">A class containing <see cref="IStatePropertyAccessor{T}"/> used
/// to manage state.</param>
/// <param name="loggerFactory">A <see cref="ILoggerFactory"/> that is hooked to the Azure
/// App Service provider.</param>
public DialogPromptBot(DialogPromptBotAccessors accessors, ILoggerFactory loggerFactory)
{
if (loggerFactory == null)
{
throw new System.ArgumentNullException(nameof(loggerFactory));
}
_logger = loggerFactory.CreateLogger<DialogPromptBot>();
_logger.LogTrace("EchoBot turn start.");
_accessors = accessors ?? throw new System.ArgumentNullException(nameof(accessors));
// Create the dialog set and add the prompts, including custom validation.
_dialogSet = new DialogSet(_accessors.DialogStateAccessor);
_dialogSet.Add(new NumberPrompt<int>(SizeRangePrompt, RangeValidatorAsync));
_dialogSet.Add(new ChoicePrompt(LocationPrompt));
_dialogSet.Add(new DateTimePrompt(ReservationDatePrompt, DateValidatorAsync));
// Define the steps of the waterfall dialog and add it to the set.
var steps = new WaterfallStep[]
{
PromptForPartySizeAsync,
PromptForLocationAsync,
PromptForReservationDateAsync,
AcknowledgeReservationAsync,
};
_dialogSet.Add(new WaterfallDialog(ReservationDialog, steps));
}
/// <summary>
/// Every conversation turn for our Echo Bot will call this method.
/// There are no dialogs used, since it's "single turn" processing, meaning a single
/// request and response.
/// </summary>
/// <param name="turnContext">A <see cref="ITurnContext"/> containing all the data needed
/// for processing this conversation turn. </param>
/// <param name="cancellationToken">(Optional) A <see cref="CancellationToken"/> that can
/// be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> that represents the work queued to execute.</returns>
/// <seealso cref="BotStateSet"/>
/// <seealso cref="ConversationState"/>
/// <seealso cref="IMiddleware"/>
public async Task OnTurnAsync(
ITurnContext turnContext,
CancellationToken cancellationToken = default(CancellationToken))
{
switch (turnContext.Activity.Type)
{
// On a message from the user:
case ActivityTypes.Message:
// Get the current reservation info from state.
var reservation = await _accessors.ReservationAccessor.GetAsync(
turnContext,
() => null,
cancellationToken);
// Generate a dialog context for our dialog set.
var dc = await _dialogSet.CreateContextAsync(turnContext, cancellationToken);
if (dc.ActiveDialog is null)
{
// If there is no active dialog, check whether we have a reservation yet.
if (reservation is null)
{
// If not, start the dialog.
await dc.BeginDialogAsync(ReservationDialog, null, cancellationToken);
}
else
{
// Otherwise, send a status message.
await turnContext.SendActivityAsync(
$"We'll see you on {reservation.Date}.",
cancellationToken: cancellationToken);
}
}
else
{
// Continue the dialog.
var dialogTurnResult = await dc.ContinueDialogAsync(cancellationToken);
// If the dialog completed this turn, record the reservation info.
if (dialogTurnResult.Status is DialogTurnStatus.Complete)
{
reservation = (Reservation)dialogTurnResult.Result;
await _accessors.ReservationAccessor.SetAsync(
turnContext,
reservation,
cancellationToken);
// Send a confirmation message to the user.
await turnContext.SendActivityAsync(
$"Your party of {reservation.Size} is confirmed for " +
$"{reservation.Date} in {reservation.Location}.",
cancellationToken: cancellationToken);
}
}
// Save the updated dialog state into the conversation state.
await _accessors.ConversationState.SaveChangesAsync(
turnContext, false, cancellationToken);
break;
}
}
/// <summary>First step of the main dialog: prompt for party size.</summary>
/// <param name="stepContext">The context for the waterfall step.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains information from this step.</remarks>
private async Task<DialogTurnResult> PromptForPartySizeAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken = default(CancellationToken))
{
// Prompt for the party size. The result of the prompt is returned to the next step of the waterfall.
return await stepContext.PromptAsync(
SizeRangePrompt,
new PromptOptions
{
Prompt = MessageFactory.Text("How many people is the reservation for?"),
RetryPrompt = MessageFactory.Text("How large is your party?"),
Validations = new Range { Min = 3, Max = 8 },
},
cancellationToken);
}
/// <summary>Second step of the main dialog: prompt for location.</summary>
/// <param name="stepContext">The context for the waterfall step.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains information from this step.</remarks>
private async Task<DialogTurnResult> PromptForLocationAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken)
{
// Record the party size information in the current dialog state.
var size = (int)stepContext.Result;
stepContext.Values[PartySizeKey] = size;
// Prompt for the location.
return await stepContext.PromptAsync(
LocationPrompt,
new PromptOptions
{
Prompt = MessageFactory.Text("Please choose a location."),
RetryPrompt = MessageFactory.Text("Sorry, please choose a location from the list."),
Choices = ChoiceFactory.ToChoices(new List<string> { "Redmond", "Bellevue", "Seattle" }),
},
cancellationToken);
}
/// <summary>Third step of the main dialog: prompt for the reservation date.</summary>
/// <param name="stepContext">The context for the waterfall step.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains information from this step.</remarks>
private async Task<DialogTurnResult> PromptForReservationDateAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken = default(CancellationToken))
{
// Record the party size information in the current dialog state.
var location = (stepContext.Result as FoundChoice).Value;
stepContext.Values[LocationKey] = location;
// Prompt for the reservation date.
return await stepContext.PromptAsync(
ReservationDatePrompt,
new PromptOptions
{
Prompt = MessageFactory.Text("Great. When will the reservation be for?"),
RetryPrompt = MessageFactory.Text("What time should we make your reservation for?"),
},
cancellationToken);
}
/// <summary>Last step of the main dialog: return the collected reservation information.</summary>
/// <param name="stepContext">The context for the waterfall step.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>If the task is successful, the result contains information from this step.</remarks>
private async Task<DialogTurnResult> AcknowledgeReservationAsync(
WaterfallStepContext stepContext,
CancellationToken cancellationToken = default(CancellationToken))
{
// Retrieve the reservation date.
var resolution = (stepContext.Result as IList<DateTimeResolution>).First();
var time = resolution.Value ?? resolution.Start;
// Send an acknowledgement to the user.
await stepContext.Context.SendActivityAsync(
"Thank you. We will confirm your reservation shortly.",
cancellationToken: cancellationToken);
// Return the collected information to the parent context.
var reservation = new Reservation
{
Date = time,
Size = (int)stepContext.Values[PartySizeKey],
Location = (string)stepContext.Values[LocationKey],
};
return await stepContext.EndDialogAsync(reservation, cancellationToken);
}
/// <summary>Validates whether the party size is appropriate to make a reservation.</summary>
/// <param name="promptContext">The validation context.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>Reservations can be made for groups of 6 to 20 people.
/// If the task is successful, the result indicates whether the input was valid.</remarks>
private async Task<bool> RangeValidatorAsync(
PromptValidatorContext<int> promptContext,
CancellationToken cancellationToken)
{
// Check whether the input could be recognized as an integer.
if (!promptContext.Recognized.Succeeded)
{
await promptContext.Context.SendActivityAsync(
"I'm sorry, I do not understand. Please enter the number of people in your party.",
cancellationToken: cancellationToken);
return false;
}
// Check whether the party size is appropriate.
var size = promptContext.Recognized.Value;
var validRange = promptContext.Options.Validations as Range;
if (size < validRange.Min || size > validRange.Max)
{
await promptContext.Context.SendActivitiesAsync(
new Activity[]
{
MessageFactory.Text($"Sorry, we can only take reservations for parties " +
$"of {validRange.Min} to {validRange.Max}."),
promptContext.Options.RetryPrompt,
},
cancellationToken: cancellationToken);
return false;
}
return true;
}
/// <summary>Validates whether the reservation date is appropriate.</summary>
/// <param name="promptContext">The validation context.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>Reservations must be made at least an hour in advance.
/// If the task is successful, the result indicates whether the input was valid.</remarks>
private async Task<bool> DateValidatorAsync(
PromptValidatorContext<IList<DateTimeResolution>> promptContext,
CancellationToken cancellationToken = default(CancellationToken))
{
// Check whether the input could be recognized as an integer.
if (!promptContext.Recognized.Succeeded)
{
await promptContext.Context.SendActivityAsync(
"I'm sorry, I do not understand. Please enter the date or time for your reservation.",
cancellationToken: cancellationToken);
return false;
}
// Check whether any of the recognized date-times are appropriate,
// and if so, return the first appropriate date-time.
var earliest = DateTime.Now.AddHours(1.0);
var value = promptContext.Recognized.Value.FirstOrDefault(v =>
DateTime.TryParse(v.Value ?? v.Start, out var time) && DateTime.Compare(earliest, time) <= 0);
if (value != null)
{
promptContext.Recognized.Value.Clear();
promptContext.Recognized.Value.Add(value);
return true;
}
await promptContext.Context.SendActivityAsync(
"I'm sorry, we can't take reservations earlier than an hour from now.",
cancellationToken: cancellationToken);
return false;
}
/// <summary>Describes an acceptable range of values.</summary>
public class Range
{
public int Min { get; set; }
public int Max { get; set; }
}
/// <summary>Holds a user's reservation information.</summary>
public class Reservation
{
public int Size { get; set; }
public string Location { get; set; }
public string Date { get; set; }
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<CodeAnalysisRuleSet>DialogPromptBot.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn),1573,1591,1712</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="dialog-prompt.bot">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Configuration" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Schema" Version="4.2.2" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta008" PrivateAssets="all" />
</ItemGroup>
</Project>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.ruleset
================================================
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1011" Action="None" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1129" Action="None" />
<Rule Id="SA1305" Action="Warning" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1412" Action="Warning" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1609" Action="Warning" />
<Rule Id="SA1633" Action="None" />
</Rules>
<Rules AnalyzerId="AsyncUsageAnalyzers" RuleNamespace="AsyncUsageAnalyzers">
<Rule Id="AvoidAsyncVoid" Action="Warning" />
</Rules>
</RuleSet>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.xml
================================================
<?xml version="1.0"?>
<doc>
<assembly>
<name>DialogPromptBot</name>
</assembly>
<members>
<member name="T:Microsoft.BotBuilderSamples.DialogPromptBot">
<summary>
Represents a bot that processes incoming activities.
For each user interaction, an instance of this class is created and the OnTurnAsync method
is called. This is a Transient lifetime service. Transient lifetime services are created
each time they're requested. For each Activity received, a new instance of this class is
created. Objects that are expensive to construct, or have a lifetime beyond the single
turn, should be carefully managed. For example, the <see cref="T:Microsoft.Bot.Builder.MemoryStorage"/> object and
associated <see cref="T:Microsoft.Bot.Builder.IStatePropertyAccessor`1"/> object are created with a singleton lifetime.
</summary>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.#ctor(Microsoft.BotBuilderSamples.DialogPromptBotAccessors,Microsoft.Extensions.Logging.ILoggerFactory)">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.BotBuilderSamples.DialogPromptBot"/> class.
</summary>
<param name="accessors">A class containing <see cref="T:Microsoft.Bot.Builder.IStatePropertyAccessor`1"/> used
to manage state.</param>
<param name="loggerFactory">A <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> that is hooked to the Azure
App Service provider.</param>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.OnTurnAsync(Microsoft.Bot.Builder.ITurnContext,System.Threading.CancellationToken)">
<summary>
Every conversation turn for our Echo Bot will call this method.
There are no dialogs used, since it's "single turn" processing, meaning a single
request and response.
</summary>
<param name="turnContext">A <see cref="T:Microsoft.Bot.Builder.ITurnContext"/> containing all the data needed
for processing this conversation turn. </param>
<param name="cancellationToken">(Optional) A <see cref="T:System.Threading.CancellationToken"/> that can
be used by other objects or threads to receive notice of cancellation.</param>
<returns>A <see cref="T:System.Threading.Tasks.Task"/> that represents the work queued to execute.</returns>
<seealso cref="T:Microsoft.Bot.Builder.BotStateSet"/>
<seealso cref="T:Microsoft.Bot.Builder.ConversationState"/>
<seealso cref="T:Microsoft.Bot.Builder.IMiddleware"/>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.PromptForPartySizeAsync(Microsoft.Bot.Builder.Dialogs.WaterfallStepContext,System.Threading.CancellationToken)">
<summary>First step of the main dialog: prompt for party size.</summary>
<param name="stepContext">The context for the waterfall step.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>If the task is successful, the result contains information from this step.</remarks>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.PromptForLocationAsync(Microsoft.Bot.Builder.Dialogs.WaterfallStepContext,System.Threading.CancellationToken)">
<summary>Second step of the main dialog: prompt for location.</summary>
<param name="stepContext">The context for the waterfall step.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>If the task is successful, the result contains information from this step.</remarks>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.PromptForReservationDateAsync(Microsoft.Bot.Builder.Dialogs.WaterfallStepContext,System.Threading.CancellationToken)">
<summary>Third step of the main dialog: prompt for the reservation date.</summary>
<param name="stepContext">The context for the waterfall step.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>If the task is successful, the result contains information from this step.</remarks>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.AcknowledgeReservationAsync(Microsoft.Bot.Builder.Dialogs.WaterfallStepContext,System.Threading.CancellationToken)">
<summary>Last step of the main dialog: return the collected reservation information.</summary>
<param name="stepContext">The context for the waterfall step.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>If the task is successful, the result contains information from this step.</remarks>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.RangeValidatorAsync(Microsoft.Bot.Builder.Dialogs.PromptValidatorContext{System.Int32},System.Threading.CancellationToken)">
<summary>Validates whether the party size is appropriate to make a reservation.</summary>
<param name="promptContext">The validation context.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>Reservations can be made for groups of 6 to 20 people.
If the task is successful, the result indicates whether the input was valid.</remarks>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBot.DateValidatorAsync(Microsoft.Bot.Builder.Dialogs.PromptValidatorContext{System.Collections.Generic.IList{Microsoft.Bot.Builder.Dialogs.DateTimeResolution}},System.Threading.CancellationToken)">
<summary>Validates whether the reservation date is appropriate.</summary>
<param name="promptContext">The validation context.</param>
<param name="cancellationToken">A cancellation token that can be used by other objects
or threads to receive notice of cancellation.</param>
<returns>A task that represents the work queued to execute.</returns>
<remarks>Reservations must be made at least an hour in advance.
If the task is successful, the result indicates whether the input was valid.</remarks>
</member>
<member name="T:Microsoft.BotBuilderSamples.DialogPromptBot.Range">
<summary>Describes an acceptable range of values.</summary>
</member>
<member name="T:Microsoft.BotBuilderSamples.DialogPromptBot.Reservation">
<summary>Holds a user's reservation information.</summary>
</member>
<member name="T:Microsoft.BotBuilderSamples.DialogPromptBotAccessors">
<summary>
This class is created as a Singleton and passed into the IBot-derived constructor.
- See <see cref="T:Microsoft.BotBuilderSamples.DialogPromptBot"/> constructor for how that is injected.
- See the Startup.cs file for more details on creating the Singleton that gets
injected into the constructor.
</summary>
</member>
<member name="M:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.#ctor(Microsoft.Bot.Builder.ConversationState)">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.BotBuilderSamples.DialogPromptBotAccessors"/> class.
Contains the <see cref="P:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.ConversationState"/> and associated <see cref="T:Microsoft.Bot.Builder.IStatePropertyAccessor`1"/>.
</summary>
<param name="conversationState">The state object that stores the counter.</param>
</member>
<member name="P:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.DialogStateAccessor">
<summary>
Gets or sets the <see cref="T:Microsoft.Bot.Builder.IStatePropertyAccessor`1"/> for CounterState.
</summary>
<value>
The accessor stores the turn count for the conversation.
</value>
</member>
<member name="P:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.ConversationState">
<summary>
Gets the <see cref="P:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.ConversationState"/> object for the conversation.
</summary>
<value>The <see cref="P:Microsoft.BotBuilderSamples.DialogPromptBotAccessors.ConversationState"/> object.</value>
</member>
<member name="T:Microsoft.BotBuilderSamples.Startup">
<summary>
The Startup class configures services and the request pipeline.
</summary>
</member>
<member name="P:Microsoft.BotBuilderSamples.Startup.Configuration">
<summary>
Gets the configuration that represents a set of key/value application configuration properties.
</summary>
<value>
The <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> that represents a set of key/value application configuration properties.
</value>
</member>
<member name="M:Microsoft.BotBuilderSamples.Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
This method gets called by the runtime. Use this method to add services to the container.
</summary>
<param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> specifies the contract for a collection of service descriptors.</param>
<seealso cref="T:Microsoft.Bot.Builder.IStatePropertyAccessor`1"/>
</member>
</members>
</doc>
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBotAccessors.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
namespace Microsoft.BotBuilderSamples
{
/// <summary>
/// This class is created as a Singleton and passed into the IBot-derived constructor.
/// - See <see cref="DialogPromptBot"/> constructor for how that is injected.
/// - See the Startup.cs file for more details on creating the Singleton that gets
/// injected into the constructor.
/// </summary>
public class DialogPromptBotAccessors
{
/// <summary>
/// Initializes a new instance of the <see cref="DialogPromptBotAccessors"/> class.
/// Contains the <see cref="ConversationState"/> and associated <see cref="IStatePropertyAccessor{T}"/>.
/// </summary>
/// <param name="conversationState">The state object that stores the counter.</param>
public DialogPromptBotAccessors(ConversationState conversationState)
{
ConversationState = conversationState
?? throw new ArgumentNullException(nameof(conversationState));
}
public static string DialogStateAccessorKey { get; }
= "DialogPromptBotAccessors.DialogState";
public static string ReservationAccessorKey { get; }
= "DialogPromptBotAccessors.Reservation";
/// <summary>
/// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for CounterState.
/// </summary>
/// <value>
/// The accessor stores the turn count for the conversation.
/// </value>
public IStatePropertyAccessor<DialogState> DialogStateAccessor { get; set; }
public IStatePropertyAccessor<DialogPromptBot.Reservation> ReservationAccessor { get; set; }
/// <summary>
/// Gets the <see cref="ConversationState"/> object for the conversation.
/// </summary>
/// <value>The <see cref="ConversationState"/> object.</value>
public ConversationState ConversationState { get; }
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/Program.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace Microsoft.BotBuilderSamples
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureLogging((hostingContext, logging) =>
{
// Add Azure Logging
logging.AddAzureWebAppDiagnostics();
// Logging Options.
// There are other logging options available:
// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1
// logging.AddDebug();
// logging.AddConsole();
})
// Logging Options.
// Consider using Application Insights for your logging and metrics needs.
// https://azure.microsoft.com/en-us/services/application-insights/
// .UseApplicationInsights()
.UseStartup<Startup>()
.Build();
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/Properties/launchSettings.json
================================================
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3978/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"PromptsBot": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:3978/"
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/README.md
================================================
# Dialog Prompt Bot
This sample demonstrates how to use dialog prompts in your ASP.Net Core 2 bot to gather and validate user input.
# To try this sample
- Clone the samples repository
```bash
git clone https://github.com/Microsoft/BotFramework-Samples.git
```
- [Optional] Update the `appsettings.json` file under `BotFramework-Samples\dotnet_core\DialogPromptBot` with your botFileSecret. For Azure Bot Service bots, you can find the botFileSecret under application settings.
# Prerequisites
## Visual Studio
- Navigate to the samples folder (`BotFramework-Samples\SDKV4-Samples\dotnet_core\DialogPromptBot`) and open DialogPromptBot.csproj in Visual Studio.
- Hit F5.
## Visual Studio Code
- Open `BotFramework-Samples\SDKV4-Samples\dotnet_core\DialogPromptBot` sample folder.
- Bring up a terminal, navigate to `BotFramework-Samples\SDKV4-Samples\dotnet_core\DialogPromptBot` folder.
- Type 'dotnet run'.
## Testing the bot using Bot Framework Emulator
[Microsoft Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot
developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the Bot Framework emulator from [here](https://aka.ms/botframeworkemulator).
## Connect to bot using Bot Framework Emulator **V4**
- Launch the Bot Framework Emulator.
- File -> Open bot and navigate to `BotFramework-Samples\SDKV4-Samples\dotnet_core\DialogPromptBot` folder.
- Select `dialog-prompt.bot` file.
# Further reading
- [Azure Bot Service Introduction](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Bot State](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-storage-concept?view=azure-bot-service-4.0)
- [Managing conversation and user state](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-state?view=azure-bot-service-4.0&tabs=js)
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/Startup.cs
================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Integration;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace Microsoft.BotBuilderSamples
{
/// <summary>
/// The Startup class configures services and the request pipeline.
/// </summary>
public class Startup
{
private ILoggerFactory _loggerFactory;
private readonly bool _isProduction = false;
public Startup(IHostingEnvironment env)
{
_isProduction = env.IsProduction();
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
/// <summary>
/// Gets the configuration that represents a set of key/value application configuration properties.
/// </summary>
/// <value>
/// The <see cref="IConfiguration"/> that represents a set of key/value application configuration properties.
/// </value>
public IConfiguration Configuration { get; }
/// <summary>
/// This method gets called by the runtime. Use this method to add services to the container.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> specifies the contract for a collection of service descriptors.</param>
/// <seealso cref="IStatePropertyAccessor{T}"/>
public void ConfigureServices(IServiceCollection services)
{
var secretKey = Configuration.GetSection("botFileSecret")?.Value;
var botFilePath = Configuration.GetSection("botFilePath")?.Value;
// Loads .bot configuration file and adds a singleton that your Bot can access through dependency injection.
var botConfig = BotConfiguration.Load(botFilePath ?? @".\dialog-prompt.bot", secretKey);
services.AddSingleton(sp => botConfig
?? throw new InvalidOperationException($"The .bot config file could not be loaded. ({botConfig})"));
// The Memory Storage used here is for local bot debugging only. When the bot
// is restarted, everything stored in memory will be gone.
IStorage dataStore = new MemoryStorage();
// Create Conversation State object.
// The Conversation State object is where we persist anything at the conversation-scope.
var conversationState = new ConversationState(dataStore);
// Create and register state accesssors.
// Acessors created here are passed into the IBot-derived class on every turn.
services.AddSingleton<DialogPromptBotAccessors>(sp =>
{
// Create the custom state accessor.
// State accessors enable other components to read and write individual properties of state.
var accessors = new DialogPromptBotAccessors(conversationState)
{
DialogStateAccessor =
conversationState.CreateProperty<DialogState>(
DialogPromptBotAccessors.DialogStateAccessorKey),
ReservationAccessor =
conversationState.CreateProperty<DialogPromptBot.Reservation>(
DialogPromptBotAccessors.ReservationAccessorKey),
};
return accessors;
});
services.AddBot<DialogPromptBot>(options =>
{
// Retrieve current endpoint.
var environment = _isProduction ? "production" : "development";
var service = botConfig.Services.Where(s => s.Type == "endpoint" && s.Name == environment).FirstOrDefault();
if (!(service is EndpointService endpointService))
{
throw new InvalidOperationException($"The .bot file does not contain an endpoint with name '{environment}'.");
}
options.CredentialProvider = new SimpleCredentialProvider(endpointService.AppId, endpointService.AppPassword);
// Creates a logger for the application to use.
ILogger logger = _loggerFactory.CreateLogger<DialogPromptBot>();
// Catches any errors that occur during a conversation turn and logs them.
options.OnTurnError = async (context, exception) =>
{
logger.LogError($"Exception caught : {exception}");
await context.SendActivityAsync("Sorry, it looks like something went wrong.");
};
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
_loggerFactory = loggerFactory;
app.UseDefaultFiles()
.UseStaticFiles()
.UseBotFramework();
}
}
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/appsettings.json
================================================
{
"botFilePath": "dialog-prompt.bot",
"botFileSecret": ""
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/dialog-prompt.bot
================================================
{
"name": "PromptsBot",
"services": [
{
"type": "endpoint",
"name": "development",
"endpoint": "http://localhost:3978/api/messages",
"appId": "",
"appPassword": "",
"id": "1"
}
],
"padlock": "",
"version": "2.0"
}
================================================
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/wwwroot/default.htm
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dialog Prompt Bot sample</title>
<style>
body {
margin: 0px;
padding: 0px;
font-family: Segoe UI;
}
html,
body {
height: 100%;
}
header {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 4638.9 651.6' style='enable-background:new 0 0 4638.9 651.6;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%2355A0E0;%7D .st1%7Bfill:none;%7D .st2%7Bfill:%230058A8;%7D .st3%7Bfill:%23328BD8;%7D .st4%7Bfill:%23B6DCF1;%7D .st5%7Bopacity:0.2;fill:url(%23SVGID_1_);enable-background:new ;%7D%0A%3C/style%3E%3Crect y='1.1' class='st0' width='4640' height='646.3'/%3E%3Cpath class='st1' d='M3987.8,323.6L4310.3,1.1h-65.6l-460.1,460.1c-17.5,17.5-46.1,17.5-63.6,0L3260.9,1.1H0v646.3h3660.3 L3889,418.7c17.5-17.5,46.1-17.5,63.6,0l228.7,228.7h66.6l-260.2-260.2C3970.3,369.8,3970.3,341.1,3987.8,323.6z'/%3E%3Cpath class='st2' d='M3784.6,461.2L4244.7,1.1h-983.9l460.1,460.1C3738.4,478.7,3767.1,478.7,3784.6,461.2z'/%3E%3Cpath class='st3' d='M4640,1.1h-329.8l-322.5,322.5c-17.5,17.5-17.5,46.1,0,63.6l260.2,260.2H4640L4640,1.1L4640,1.1z'/%3E%3Cpath class='st4' d='M3889,418.8l-228.7,228.7h521.1l-228.7-228.7C3935.2,401.3,3906.5,401.3,3889,418.8z'/%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='3713.7576' y1='438.1175' x2='3911.4084' y2='14.2535' gradientTransform='matrix(1 0 0 -1 0 641.3969)'%3E%3Cstop offset='0' style='stop-color:%23FFFFFF;stop-opacity:0.5'/%3E%3Cstop offset='1' style='stop-color:%23FFFFFF'/%3E%3C/linearGradient%3E%3Cpath class='st5' d='M3952.7,124.5c-17.5-17.5-46.1-17.5-63.6,0l-523,523h1109.6L3952.7,124.5z'/%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
background-size: 100%;
background-position: right;
background-color: #55A0E0;
width: 100%;
font-size: 44px;
height: 120px;
color: white;
padding: 30px 0 40px 0px;
display: inline-block;
}
.header-icon {
background-image: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20150.2%20125%22%20style%3D%22enable-background%3Anew%200%200%20150.2%20125%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23FFFFFF%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.5%22%20class%3D%22st0%22%20width%3D%22149.7%22%20height%3D%22125%22/%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M59%2C102.9L21.8%2C66c-3.5-3.5-3.5-9.1%2C0-12.5l37-36.5l2.9%2C3l-37%2C36.4c-1.8%2C1.8-1.8%2C4.7%2C0%2C6.6l37.2%2C37L59%2C102.9z%22%0A%09%09/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M92.5%2C102.9l-3-3l37.2-37c0.9-0.9%2C1.4-2%2C1.4-3.3c0-1.2-0.5-2.4-1.4-3.3L89.5%2C20l2.9-3l37.2%2C36.4%0A%09%09c1.7%2C1.7%2C2.6%2C3.9%2C2.6%2C6.3s-0.9%2C4.6-2.6%2C6.3L92.5%2C102.9z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M90.1%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C98.1%2C64.7%2C94.4%2C68.4%2C90.1%2C68.4z%0A%09%09%20M90.1%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S91.9%2C56.5%2C90.1%2C56.5z%22/%3E%0A%3C/g%3E%0A%3Cg%3E%0A%09%3Cpath%20class%3D%22st1%22%20d%3D%22M61.4%2C68.4c-4.5%2C0-8-3.5-8-8.1c0-4.5%2C3.5-8.1%2C8-8.1c4.4%2C0%2C8%2C3.7%2C8%2C8.1C69.5%2C64.7%2C65.8%2C68.4%2C61.4%2C68.4z%0A%09%09%20M61.4%2C56.5c-2.2%2C0-3.8%2C1.7-3.8%2C3.9c0%2C2.2%2C1.7%2C3.9%2C3.8%2C3.9c1.9%2C0%2C3.8-1.6%2C3.8-3.9S63.3%2C56.5%2C61.4%2C56.5z%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
background-repeat: no-repeat;
float: left;
height: 140px;
width: 140px;
display: inline-block;
vertical-align: middle;
}
.header-text {
padding-left: 1%;
color: #FFFFFF;
font-family: "Segoe UI";
font-size: 72px;
font-weight: 300;
letter-spacing: 0.35px;
line-height: 96px;
display: inline-block;
vertical-align: middle;
}
.header-inner-container {
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
vertical-align: middle;
}
.header-inner-container::after {
content: "";
clear: both;
display: table;
}
.main-content-area {
padding-left: 30px;
}
.content-title {
color: #000000;
font-family: "Segoe UI";
font-size: 46px;
font-weight: 300;
line-height: 62px;
}
.main-text {
color: #808080;
font-size: 24px;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
}
.main-text-p1{
padding-top: 48px;
padding-bottom: 28px;
}
.endpoint {
height: 32px;
width: 571px;
color: #808080;
font-family: "Segoe UI";
font-size: 24px;
font-weight: 200;
line-height: 32px;
padding-top: 28px;
}
.how-to-build-section {
padding-top: 20px;
padding-left: 30px;
}
.how-to-build-section>h3 {
font-size: 16px;
font-weight: 600;
letter-spacing: 0.35px;
line-height: 22px;
margin: 0 0 24px 0;
text-transform: uppercase;
}
.step-container {
display: flex;
align-items: stretch;
position: relative;
}
.step-container dl {
border-left: 1px solid #A0A0A0;
display: block;
padding: 0 24px;
margin: 0;
}
.step-container dl>dt::before {
background-color: white;
border: 1px solid #A0A0A0;
border-radius: 100%;
content: '';
left: 47px;
height: 11px;
position: absolute;
width: 11px;
}
.step-container dl>.test-bullet::before {
background-color: blue;
}
.step-container dl>dt {
display: block;
font-size: inherit;
font-weight: bold;
line-height: 20px;
}
.step-container dl>dd {
font-size: inherit;
line-height: 20px;
margin-left: 0;
padding-bottom: 32px;
}
.step-container:last-child dl {
border-left: 1px solid transparent;
}
.ctaLink {
background-color: transparent;
border: 1px solid transparent;
color: #006AB1;
cursor: pointer;
font-weight: 600;
padding: 0;
white-space: normal;
}
.ctaLink:focus {
outline: 1px solid #00bcf2;
}
.ctaLink:hover {
text-decoration: underline;
}
.step-icon {
display: flex;
height: 38px;
margin-right: 15px;
width: 38px;
}
.step-icon>div {
height: 30px;
width: 30px;
background-repeat: no-repeat;
}
.ms-logo-container {
min-width: 580px;
max-width: 980px;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
transition: bottom 400ms;
}
.ms-logo {
float: right;
background-image: url("data:image/svg+xml;utf8,%0A%3Csvg%20version%3D%221.1%22%20id%3D%22MS-symbol%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%20400%20120%22%20style%3D%22enable-background%3Anew%200%200%20400%20120%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text/css%22%3E%0A%09.st0%7Bfill%3Anone%3B%7D%0A%09.st1%7Bfill%3A%23737474%3B%7D%0A%09.st2%7Bfill%3A%23D63F26%3B%7D%0A%09.st3%7Bfill%3A%23167D3E%3B%7D%0A%09.st4%7Bfill%3A%232E76BC%3B%7D%0A%09.st5%7Bfill%3A%23FDB813%3B%7D%0A%3C/style%3E%0A%3Crect%20x%3D%220.6%22%20class%3D%22st0%22%20width%3D%22398.7%22%20height%3D%22119%22/%3E%0A%3Cpath%20class%3D%22st1%22%20d%3D%22M171.3%2C38.4v43.2h-7.5V47.7h-0.1l-13.4%2C33.9h-5l-13.7-33.9h-0.1v33.9h-6.9V38.4h10.8l12.4%2C32h0.2l13.1-32H171.3%0A%09z%20M177.6%2C41.7c0-1.2%2C0.4-2.2%2C1.3-3c0.9-0.8%2C1.9-1.2%2C3.1-1.2c1.3%2C0%2C2.4%2C0.4%2C3.2%2C1.3c0.8%2C0.8%2C1.3%2C1.8%2C1.3%2C3c0%2C1.2-0.4%2C2.2-1.3%2C3%0A%09c-0.9%2C0.8-1.9%2C1.2-3.2%2C1.2s-2.3-0.4-3.1-1.2C178%2C43.8%2C177.6%2C42.8%2C177.6%2C41.7z%20M185.7%2C50.6v31h-7.3v-31H185.7z%20M207.8%2C76.3%0A%09c1.1%2C0%2C2.3-0.3%2C3.6-0.8c1.3-0.5%2C2.5-1.2%2C3.6-2v6.8c-1.2%2C0.7-2.5%2C1.2-4%2C1.5c-1.5%2C0.3-3.1%2C0.5-4.9%2C0.5c-4.6%2C0-8.3-1.4-11.1-4.3%0A%09c-2.9-2.9-4.3-6.6-4.3-11c0-5%2C1.5-9.1%2C4.4-12.3c2.9-3.2%2C7-4.8%2C12.4-4.8c1.4%2C0%2C2.7%2C0.2%2C4.1%2C0.5c1.4%2C0.4%2C2.5%2C0.8%2C3.3%2C1.2v7%0A%09c-1.1-0.8-2.3-1.5-3.4-1.9c-1.2-0.5-2.4-0.7-3.6-0.7c-2.9%2C0-5.2%2C0.9-7%2C2.8c-1.8%2C1.9-2.7%2C4.4-2.7%2C7.6c0%2C3.1%2C0.8%2C5.6%2C2.5%2C7.3%0A%09C202.6%2C75.4%2C204.9%2C76.3%2C207.8%2C76.3z%20M235.7%2C50.1c0.6%2C0%2C1.1%2C0%2C1.6%2C0.1s0.9%2C0.2%2C1.2%2C0.3v7.4c-0.4-0.3-0.9-0.5-1.7-0.8%0A%09c-0.7-0.3-1.6-0.4-2.7-0.4c-1.8%2C0-3.3%2C0.8-4.5%2C2.3c-1.2%2C1.5-1.9%2C3.8-1.9%2C7v15.6h-7.3v-31h7.3v4.9h0.1c0.7-1.7%2C1.7-3%2C3-4%0A%09C232.2%2C50.6%2C233.8%2C50.1%2C235.7%2C50.1z%20M238.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3%0A%09c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5c-4.8%2C0-8.6-1.4-11.4-4.2C240.3%2C75.3%2C238.9%2C71.4%2C238.9%2C66.6z%0A%09%20M246.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5%0A%09c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7C247.2%2C60.5%2C246.5%2C63%2C246.5%2C66.3z%20M281.5%2C58.8c0%2C1%2C0.3%2C1.9%2C1%2C2.5%0A%09c0.7%2C0.6%2C2.1%2C1.3%2C4.4%2C2.2c2.9%2C1.2%2C5%2C2.5%2C6.1%2C3.9c1.2%2C1.5%2C1.8%2C3.2%2C1.8%2C5.3c0%2C2.9-1.1%2C5.3-3.4%2C7c-2.2%2C1.8-5.3%2C2.7-9.1%2C2.7%0A%09c-1.3%2C0-2.7-0.2-4.3-0.5c-1.6-0.3-2.9-0.7-4-1.2v-7.2c1.3%2C0.9%2C2.8%2C1.7%2C4.3%2C2.2c1.5%2C0.5%2C2.9%2C0.8%2C4.2%2C0.8c1.6%2C0%2C2.9-0.2%2C3.6-0.7%0A%09c0.8-0.5%2C1.2-1.2%2C1.2-2.3c0-1-0.4-1.9-1.2-2.5c-0.8-0.7-2.4-1.5-4.6-2.4c-2.7-1.1-4.6-2.4-5.7-3.8c-1.1-1.4-1.7-3.2-1.7-5.4%0A%09c0-2.8%2C1.1-5.1%2C3.3-6.9c2.2-1.8%2C5.1-2.7%2C8.6-2.7c1.1%2C0%2C2.3%2C0.1%2C3.6%2C0.4c1.3%2C0.2%2C2.5%2C0.6%2C3.4%2C0.9v6.9c-1-0.6-2.1-1.2-3.4-1.7%0A%09c-1.3-0.5-2.6-0.7-3.8-0.7c-1.4%2C0-2.5%2C0.3-3.2%2C0.8C281.9%2C57.1%2C281.5%2C57.8%2C281.5%2C58.8z%20M297.9%2C66.6c0-5.1%2C1.4-9.2%2C4.3-12.2%0A%09c2.9-3%2C6.9-4.5%2C12.1-4.5c4.8%2C0%2C8.6%2C1.4%2C11.3%2C4.3c2.7%2C2.9%2C4.1%2C6.8%2C4.1%2C11.7c0%2C5-1.4%2C9-4.3%2C12c-2.9%2C3-6.8%2C4.5-11.8%2C4.5%0A%09c-4.8%2C0-8.6-1.4-11.4-4.2C299.4%2C75.3%2C297.9%2C71.4%2C297.9%2C66.6z%20M305.5%2C66.3c0%2C3.2%2C0.7%2C5.7%2C2.2%2C7.4c1.5%2C1.7%2C3.6%2C2.6%2C6.3%2C2.6%0A%09c2.7%2C0%2C4.7-0.9%2C6.1-2.6c1.4-1.7%2C2.1-4.2%2C2.1-7.6c0-3.3-0.7-5.8-2.2-7.5c-1.4-1.7-3.4-2.5-6-2.5c-2.7%2C0-4.7%2C0.9-6.2%2C2.7%0A%09C306.3%2C60.5%2C305.5%2C63%2C305.5%2C66.3z%20M353.9%2C56.6h-10.9v25h-7.4v-25h-5.2v-6h5.2v-4.3c0-3.3%2C1.1-5.9%2C3.2-8c2.1-2.1%2C4.8-3.1%2C8.1-3.1%0A%09c0.9%2C0%2C1.7%2C0%2C2.4%2C0.1c0.7%2C0.1%2C1.3%2C0.2%2C1.8%2C0.4V42c-0.2-0.1-0.7-0.3-1.3-0.5c-0.6-0.2-1.3-0.3-2.1-0.3c-1.5%2C0-2.7%2C0.5-3.5%2C1.4%0A%09s-1.2%2C2.4-1.2%2C4.2v3.7h10.9v-7l7.3-2.2v9.2h7.4v6h-7.4v14.5c0%2C1.9%2C0.3%2C3.3%2C1%2C4c0.7%2C0.8%2C1.8%2C1.2%2C3.3%2C1.2c0.4%2C0%2C0.9-0.1%2C1.5-0.3%0A%09c0.6-0.2%2C1.1-0.4%2C1.6-0.7v6c-0.5%2C0.3-1.2%2C0.5-2.3%2C0.7c-1.1%2C0.2-2.1%2C0.3-3.2%2C0.3c-3.1%2C0-5.4-0.8-6.9-2.5c-1.5-1.6-2.3-4.1-2.3-7.4%0A%09V56.6z%22/%3E%0A%3Cg%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2224%22%20class%3D%22st2%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2224%22%20class%3D%22st3%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2231%22%20y%3D%2261.8%22%20class%3D%22st4%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%09%3Crect%20x%3D%2268.8%22%20y%3D%2261.8%22%20class%3D%22st5%22%20width%3D%2234.2%22%20height%3D%2234.2%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A");
}
.ms-logo-container>div {
min-height: 60px;
width: 150px;
background-repeat: no-repeat;
}
.row {
padding: 90px 0px 0 20px;
min-width: 480px;
max-width: 1366px;
margin-left: auto;
margin-right: auto;
}
.column {
float: left;
width: 45%;
padding-right: 20px;
}
.row:after {
content: "";
display: table;
clear: both;
}
a {
text-decoration: none;
}
.download-the-emulator {
height: 20px;
color: #0063B1;
font-size: 15px;
line-height: 20px;
padding-bottom: 70px;
}
.how-to-iframe {
max-width: 700px !important;
min-width: 650px !important;
height: 700px !important;
}
.remove-frame-heigh
gitextract_fa8vrjl3/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── SDKV4-Samples/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── _config.yml
│ ├── dotnet_core/
│ │ ├── ComplexDialogBot/
│ │ │ ├── BotBuilder.ruleset
│ │ │ ├── ComplexDialogBot.cs
│ │ │ ├── ComplexDialogBot.csproj
│ │ │ ├── ComplexDialogBotAccessors.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── complex-dialog.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── DialogInterruptionsBot/
│ │ │ ├── BotBuilder.ruleset
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── DialogInterruptionsBot.cs
│ │ │ ├── DialogInterruptionsBot.csproj
│ │ │ ├── DialogInterruptionsBotAccessors.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── dialog-interruptions.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── DialogPromptBot/
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── DialogPromptBot.cs
│ │ │ ├── DialogPromptBot.csproj
│ │ │ ├── DialogPromptBot.ruleset
│ │ │ ├── DialogPromptBot.xml
│ │ │ ├── DialogPromptBotAccessors.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.json
│ │ │ ├── dialog-prompt.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── PromptUsersForInput/
│ │ │ ├── ConversationFlow.cs
│ │ │ ├── CustomPromptBot.cs
│ │ │ ├── CustomPromptBot.ruleset
│ │ │ ├── CustomPromptBotAccessors.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── PromptUsersForInput.csproj
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── custom-prompt.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── StateBot/
│ │ │ ├── ConversationData.cs
│ │ │ ├── DeploymentScripts/
│ │ │ │ └── MsbotClone/
│ │ │ │ └── bot.recipe
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── README.md
│ │ │ ├── Startup.cs
│ │ │ ├── StateBot.cs
│ │ │ ├── StateBot.csproj
│ │ │ ├── StateBot.ruleset
│ │ │ ├── StateBot.sln
│ │ │ ├── StateBot.xml
│ │ │ ├── StateBotAccessors.cs
│ │ │ ├── UserProfile.cs
│ │ │ ├── appsettings.json
│ │ │ ├── state.bot
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── nlp-with-dispatch/
│ │ │ ├── QnAMaker.tsv
│ │ │ ├── home-automation.json
│ │ │ ├── nlp-with-dispatchDispatch.json
│ │ │ └── weather.json
│ │ └── nlp-with-luis/
│ │ └── reminders-with-entities.json
│ └── js/
│ ├── DialogPromptBot/
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── dialog-prompt.bot
│ │ ├── index.js
│ │ └── package.json
│ ├── PromptUsersForInput/
│ │ ├── .eslintrc.js
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── index.js
│ │ ├── package.json
│ │ ├── resources/
│ │ │ └── echo.chat
│ │ └── simplePrompts.bot
│ ├── complexDialogBot/
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── ComplexDialogBot.bot
│ │ ├── README.md
│ │ ├── bot.js
│ │ ├── deploymentScripts/
│ │ │ └── msbotClone/
│ │ │ └── bot.recipe
│ │ ├── iisnode.yml
│ │ ├── index.js
│ │ ├── package.json
│ │ └── web.config
│ ├── nlp-with-dispatch/
│ │ ├── QnAMaker.tsv
│ │ ├── home-automation.json
│ │ ├── nlp-with-dispatchDispatch.json
│ │ └── weather.json
│ ├── nlp-with-luis/
│ │ └── reminders-with-entities.json
│ └── stateBot/
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts/
│ │ └── msbotClone/
│ │ └── bot.recipe
│ ├── index.js
│ ├── package.json
│ ├── resources/
│ │ └── echo.chat
│ └── stateBot.bot
├── SECURITY.md
├── StackOverflow-Bot/
│ ├── .gitignore
│ ├── DialogAnalyzerFunc/
│ │ ├── AnalyzeDialog.cs
│ │ ├── Clients/
│ │ │ ├── DialogAnalyzerClient.cs
│ │ │ └── DialogDataInterpreter.cs
│ │ ├── DialogAnalyzerFunc.csproj
│ │ ├── Extensions/
│ │ │ ├── EnumerableExtensions.cs
│ │ │ └── HttpExtensions.cs
│ │ ├── Models/
│ │ │ ├── ComputerVisionImageAnalysisResult.cs
│ │ │ ├── DialogAnalysisResult.cs
│ │ │ ├── HandwritingRecognitionResult.cs
│ │ │ ├── ImageTextRegion.cs
│ │ │ └── TextAnalyticsResult.cs
│ │ ├── Services/
│ │ │ ├── ComputerVisionService.cs
│ │ │ └── TextAnalyticsService.cs
│ │ ├── Utilities/
│ │ │ ├── HttpClientUtility.cs
│ │ │ └── StringUtility.cs
│ │ └── host.json
│ ├── LICENSE
│ ├── README.md
│ ├── StackBot/
│ │ ├── Dockerfile
│ │ ├── StackBot.njsproj
│ │ ├── data/
│ │ │ ├── jokes.json
│ │ │ ├── luis.json
│ │ │ └── smalltalk.tsv
│ │ ├── dialogs/
│ │ │ ├── brain.js
│ │ │ ├── joke.js
│ │ │ ├── keywordPrompt.js
│ │ │ ├── languages.js
│ │ │ ├── menu.js
│ │ │ ├── screenshot.js
│ │ │ ├── search.js
│ │ │ └── smalltalk.js
│ │ ├── index.js
│ │ ├── lib/
│ │ │ ├── attachments.js
│ │ │ ├── bingsearchclient.js
│ │ │ ├── cognitiveservices.js
│ │ │ ├── dialoganalyzerclient.js
│ │ │ ├── qnaclient.js
│ │ │ ├── sentimentanalyzerclient.js
│ │ │ └── smalltalk.js
│ │ ├── package.json
│ │ └── static/
│ │ └── index.html
│ ├── StackCode/
│ │ ├── StackCode-0.1.1.vsix
│ │ ├── out/
│ │ │ ├── src/
│ │ │ │ ├── bot/
│ │ │ │ │ └── bot.html
│ │ │ │ └── extension.js
│ │ │ └── test/
│ │ │ ├── extension.test.js
│ │ │ └── index.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── bot/
│ │ │ │ └── bot.html
│ │ │ └── extension.ts
│ │ └── tsconfig.json
│ ├── StackOverflowBot.sln
│ └── env.template
├── _config.yml
├── blog-samples/
│ ├── CSharp/
│ │ ├── AzureSql-StateClient/
│ │ │ ├── Microsoft.Bot.Sample.AzureSql/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Microsoft.Bot.Sample.AzureSql.csproj
│ │ │ │ ├── Migrations/
│ │ │ │ │ ├── 201707121827490_Initial Setup.Designer.cs
│ │ │ │ │ ├── 201707121827490_Initial Setup.cs
│ │ │ │ │ ├── 201707121827490_Initial Setup.resx
│ │ │ │ │ └── Configuration.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── SqlStateService/
│ │ │ │ │ ├── SqlBotDataContext.cs
│ │ │ │ │ ├── SqlBotDataEntity.cs
│ │ │ │ │ └── SqlBotDataStore.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Microsoft.Bot.Sample.AzureSql.sln
│ │ │ └── README.md
│ │ ├── Bot-Feedback-Sample/
│ │ │ ├── Bot-Feedback-Sample/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── ApplicationInsights.config
│ │ │ │ ├── Bot-Feedback-Sample.csproj
│ │ │ │ ├── Connected Services/
│ │ │ │ │ └── Application Insights/
│ │ │ │ │ └── ConnectedService.json
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── FeedbackDialog.cs
│ │ │ │ │ └── QnADialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Bot-Feedback-Sample.sln
│ │ │ └── README.md
│ │ ├── BotStateExport/
│ │ │ ├── .gitignore
│ │ │ ├── BotStateExport/
│ │ │ │ ├── BotStateExport/
│ │ │ │ │ ├── App.config
│ │ │ │ │ ├── BotStateExport.csproj
│ │ │ │ │ ├── DocumentDbBotDataStore.cs
│ │ │ │ │ ├── Extensions.cs
│ │ │ │ │ ├── Program.cs
│ │ │ │ │ ├── Properties/
│ │ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ │ ├── TableBotDataStore.cs
│ │ │ │ │ └── packages.config
│ │ │ │ └── BotStateExport.sln
│ │ │ └── README.md
│ │ ├── Custom-State-BotBuilder-Azure-Sample/
│ │ │ ├── Azure-DocumentDB-Custom-State/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Azure-DocumentDB-Custom-State.csproj
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── README.md
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Azure-Table-Custom-State/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Azure-Table-Custom-State.csproj
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── README.md
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Custom-State-Sample.sln
│ │ │ └── README.md
│ │ ├── FacebookHandover/
│ │ │ ├── FacebookHandover.sln
│ │ │ ├── FacebookModel/
│ │ │ │ ├── FacebookPassThreadControl.cs
│ │ │ │ ├── FacebookPayload.cs
│ │ │ │ ├── FacebookPsid.cs
│ │ │ │ ├── FacebookRequestThreadControl.cs
│ │ │ │ ├── FacebookStandby.cs
│ │ │ │ ├── FacebookTakeThreadControl.cs
│ │ │ │ └── FacebookThreadControlHelper.cs
│ │ │ ├── Primary/
│ │ │ │ ├── Bots/
│ │ │ │ │ └── PrimaryBot.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── BotController.cs
│ │ │ │ ├── DeploymentTemplates/
│ │ │ │ │ ├── template-with-new-rg.json
│ │ │ │ │ └── template-with-preexisting-rg.json
│ │ │ │ ├── Primary.csproj
│ │ │ │ ├── Program.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── launchSettings.json
│ │ │ │ ├── Startup.cs
│ │ │ │ ├── appsettings.Development.json
│ │ │ │ ├── appsettings.json
│ │ │ │ └── wwwroot/
│ │ │ │ └── default.htm
│ │ │ ├── README.md
│ │ │ └── Secondary/
│ │ │ ├── Bots/
│ │ │ │ └── SecondaryBot.cs
│ │ │ ├── Controllers/
│ │ │ │ └── BotController.cs
│ │ │ ├── DeploymentTemplates/
│ │ │ │ ├── template-with-new-rg.json
│ │ │ │ └── template-with-preexisting-rg.json
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── launchSettings.json
│ │ │ ├── Secondary.csproj
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── wwwroot/
│ │ │ └── default.htm
│ │ ├── Luis-Scorable-QnA/
│ │ │ ├── .gitignore
│ │ │ ├── Luis-Scorable-Qna/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── CommonResponsesDialog.cs
│ │ │ │ │ ├── CommonResponsesScorable.cs
│ │ │ │ │ ├── JokeDialog.cs
│ │ │ │ │ ├── LuisDialog.cs
│ │ │ │ │ ├── QnaDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Luis-Scorable-Qna-Demo.csproj
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ └── Luis-Scorable-Qna.sln
│ │ ├── MockChannel/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MockChannelController.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── MockChannel.csproj
│ │ │ ├── MockChannel.sln
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ └── packages.config
│ │ ├── Qna-Rich-Cards/
│ │ │ ├── Qna-Rich-Cards/
│ │ │ │ ├── AnswerFormats/
│ │ │ │ │ └── JsonQnaAnswer.cs
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── QnaDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── Qna-Rich-Cards.csproj
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ ├── Qna-Rich-Cards.sln
│ │ │ └── README.md
│ │ ├── ScorableBotSample/
│ │ │ ├── .gitattributes
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── ScorableBot/
│ │ │ │ ├── App_Start/
│ │ │ │ │ └── WebApiConfig.cs
│ │ │ │ ├── Controllers/
│ │ │ │ │ └── MessagesController.cs
│ │ │ │ ├── Dialogs/
│ │ │ │ │ ├── Balance/
│ │ │ │ │ │ ├── Current/
│ │ │ │ │ │ │ └── CheckBalanceCurrentDialog.cs
│ │ │ │ │ │ ├── Savings/
│ │ │ │ │ │ │ └── CheckBalanceSavingsDialog.cs
│ │ │ │ │ │ ├── ScorableCheckBalance.cs
│ │ │ │ │ │ └── ScorableCheckBalanceDialog.cs
│ │ │ │ │ ├── MakePayment/
│ │ │ │ │ │ ├── ScorableMakePayment.cs
│ │ │ │ │ │ └── ScorableMakePaymentDialog.cs
│ │ │ │ │ └── RootDialog.cs
│ │ │ │ ├── Global.asax
│ │ │ │ ├── Global.asax.cs
│ │ │ │ ├── Properties/
│ │ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── ScorableBot.csproj
│ │ │ │ ├── Web.Debug.config
│ │ │ │ ├── Web.Release.config
│ │ │ │ ├── Web.config
│ │ │ │ ├── default.htm
│ │ │ │ └── packages.config
│ │ │ └── ScorableBotSample.sln
│ │ └── TriviaBotSpeechSample/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── TriviaApp/
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cs
│ │ │ ├── BotConnection.cs
│ │ │ ├── Converters/
│ │ │ │ └── BoolToVisibilityConverter.cs
│ │ │ ├── MainPage.xaml
│ │ │ ├── MainPage.xaml.cs
│ │ │ ├── Package.appxmanifest
│ │ │ ├── Properties/
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ └── Default.rd.xml
│ │ │ ├── TriviaApp.csproj
│ │ │ ├── ViewModels/
│ │ │ │ ├── AnswerCard.cs
│ │ │ │ ├── ChatCard.cs
│ │ │ │ ├── CountdownTimer.cs
│ │ │ │ └── ObservableDictionary.cs
│ │ │ ├── packages.config
│ │ │ └── project.json
│ │ ├── TriviaBot/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Luis/
│ │ │ │ ├── LuisEntity.cs
│ │ │ │ ├── LuisIntent.cs
│ │ │ │ ├── LuisResult.cs
│ │ │ │ └── QueryLuis.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Runtime/
│ │ │ │ ├── BotState.cs
│ │ │ │ ├── Categories.cs
│ │ │ │ ├── EnumExtensions.cs
│ │ │ │ ├── Extensions.cs
│ │ │ │ ├── Responses.cs
│ │ │ │ ├── SsmlWrapper.cs
│ │ │ │ ├── TriviaResponse.cs
│ │ │ │ └── Utility.cs
│ │ │ ├── Shared/
│ │ │ │ ├── AppEntities.cs
│ │ │ │ └── MessageType.cs
│ │ │ ├── TriviaBot.csproj
│ │ │ ├── TriviaDialog.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── TriviaBotLU.json
│ │ └── TriviaBotSpeechSample.sln
│ ├── Node/
│ │ ├── Blog-CustomState-CosmosDB/
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ └── package.json
│ │ ├── Blog-Qna-Attachments/
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ └── package.json
│ │ └── Blog-Redux-Bot/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── app.js
│ │ ├── package.json
│ │ ├── public/
│ │ │ └── index.html
│ │ └── redux/
│ │ ├── conversationActions.js
│ │ ├── dialogActions.js
│ │ ├── loadStore.js
│ │ ├── reducer.js
│ │ └── sagas/
│ │ ├── default.js
│ │ └── dialog.js
│ └── README.md
├── docs-samples/
│ ├── CSharp/
│ │ └── Simple-LUIS-Notes-Sample/
│ │ ├── Notes.json
│ │ ├── Simple-LUIS-Notes-Sample/
│ │ │ ├── App_Start/
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers/
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs/
│ │ │ │ └── SimpleNoteDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── NotesBot.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── Simple-LUIS-Notes-Sample.sln
│ │ ├── VSIX/
│ │ │ └── readme.md
│ │ └── readme.md
│ ├── Node/
│ │ └── basics-naturalLanguage/
│ │ ├── Notes.json
│ │ ├── basicNote-intentDialog.js
│ │ ├── basicNote.js
│ │ └── readme.md
│ ├── README.md
│ ├── V4/
│ │ └── JS/
│ │ └── contosocafebot-luis-dialogs/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── launch.json
│ │ ├── cafeLUISModel.json
│ │ ├── lib/
│ │ │ ├── CafeLUISModel.d.ts
│ │ │ ├── CafeLUISModel.js
│ │ │ ├── luisbot.d.ts
│ │ │ └── luisbot.js
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── src/
│ │ │ ├── .vscode/
│ │ │ │ └── launch.json
│ │ │ ├── CafeLUISModel.ts
│ │ │ └── luisbot.ts
│ │ └── tsconfig.json
│ ├── v3Node/
│ │ └── startNewDialog/
│ │ └── botadapter.js
│ └── web-chat-speech/
│ ├── index.html
│ └── readme.md
└── swagger/
├── ConnectorAPI.json
└── StateAPI.json
SYMBOL INDEX (733 symbols across 165 files)
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.cs
class ComplexDialogBot (line 27) | public class ComplexDialogBot : IBot
method ComplexDialogBot (line 64) | public ComplexDialogBot(ComplexDialogBotAccessors accessors)
method OnTurnAsync (line 100) | public async Task OnTurnAsync(ITurnContext turnContext, CancellationTo...
method SendWelcomeMessageAsync (line 165) | private static async Task SendWelcomeMessageAsync(ITurnContext turnCon...
method NameStepAsync (line 185) | private static async Task<DialogTurnResult> NameStepAsync(WaterfallSte...
method AgeStepAsync (line 204) | private async Task<DialogTurnResult> AgeStepAsync(
method StartSelectionStepAsync (line 225) | private async Task<DialogTurnResult> StartSelectionStepAsync(
method AcknowledgementStepAsync (line 255) | private async Task<DialogTurnResult> AcknowledgementStepAsync(
method SelectionStepAsync (line 279) | private async Task<DialogTurnResult> SelectionStepAsync(WaterfallStepC...
method LoopStepAsync (line 324) | private async Task<DialogTurnResult> LoopStepAsync(WaterfallStepContex...
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBotAccessors.cs
class ComplexDialogBotAccessors (line 16) | public class ComplexDialogBotAccessors
method ComplexDialogBotAccessors (line 24) | public ComplexDialogBotAccessors(ConversationState conversationState, ...
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
method BuildWebHost (line 17) | public static IWebHost BuildWebHost(string[] args) =>
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/Startup.cs
class Startup (line 22) | public class Startup
method Startup (line 27) | public Startup(IHostingEnvironment env)
method ConfigureServices (line 55) | public void ConfigureServices(IServiceCollection services)
method Configure (line 108) | public void Configure(IApplicationBuilder app, IHostingEnvironment env...
FILE: SDKV4-Samples/dotnet_core/ComplexDialogBot/UserProfile.cs
class UserProfile (line 9) | public class UserProfile
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.cs
class DialogInterruptionsBot (line 27) | public class DialogInterruptionsBot : IBot
class Companies (line 30) | private static class Companies
class Interruptions (line 51) | private static class Interruptions
method DialogInterruptionsBot (line 127) | public DialogInterruptionsBot(DialogInterruptionsBotAccessors accessors)
method OnTurnAsync (line 168) | public async Task OnTurnAsync(
method SendWelcomeMessageAsync (line 271) | private static async Task SendWelcomeMessageAsync(
method NameStepAsync (line 293) | private static async Task<DialogTurnResult> NameStepAsync(
method AgeStepAsync (line 316) | private static async Task<DialogTurnResult> AgeStepAsync(
method StartSelectionStepAsync (line 339) | private static async Task<DialogTurnResult> StartSelectionStepAsync(
method AcknowledgementStepAsync (line 369) | private static async Task<DialogTurnResult> AcknowledgementStepAsync(
method SelectionStepAsync (line 394) | private static async Task<DialogTurnResult> SelectionStepAsync(
method LoopStepAsync (line 440) | private static async Task<DialogTurnResult> LoopStepAsync(
method OnHoldStepAsync (line 494) | private static async Task<DialogTurnResult> OnHoldStepAsync(
method ContinueToHoldStepAsync (line 519) | private static async Task<DialogTurnResult> ContinueToHoldStepAsync(
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBotAccessors.cs
class DialogInterruptionsBotAccessors (line 16) | public class DialogInterruptionsBotAccessors
method DialogInterruptionsBotAccessors (line 24) | public DialogInterruptionsBotAccessors(ConversationState conversationS...
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
method BuildWebHost (line 17) | public static IWebHost BuildWebHost(string[] args) =>
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Startup.cs
class Startup (line 22) | public class Startup
method Startup (line 27) | public Startup(IHostingEnvironment env)
method ConfigureServices (line 55) | public void ConfigureServices(IServiceCollection services)
method Configure (line 108) | public void Configure(IApplicationBuilder app, IHostingEnvironment env...
FILE: SDKV4-Samples/dotnet_core/DialogInterruptionsBot/UserProfile.cs
class UserProfile (line 9) | public class UserProfile
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.cs
class DialogPromptBot (line 26) | public class DialogPromptBot : IBot
method DialogPromptBot (line 49) | public DialogPromptBot(DialogPromptBotAccessors accessors, ILoggerFact...
method OnTurnAsync (line 92) | public async Task OnTurnAsync(
method PromptForPartySizeAsync (line 161) | private async Task<DialogTurnResult> PromptForPartySizeAsync(
method PromptForLocationAsync (line 183) | private async Task<DialogTurnResult> PromptForLocationAsync(
method PromptForReservationDateAsync (line 209) | private async Task<DialogTurnResult> PromptForReservationDateAsync(
method AcknowledgeReservationAsync (line 234) | private async Task<DialogTurnResult> AcknowledgeReservationAsync(
method RangeValidatorAsync (line 264) | private async Task<bool> RangeValidatorAsync(
method DateValidatorAsync (line 303) | private async Task<bool> DateValidatorAsync(
class Range (line 335) | public class Range
class Reservation (line 343) | public class Reservation
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBotAccessors.cs
class DialogPromptBotAccessors (line 16) | public class DialogPromptBotAccessors
method DialogPromptBotAccessors (line 23) | public DialogPromptBotAccessors(ConversationState conversationState)
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
method BuildWebHost (line 17) | public static IWebHost BuildWebHost(string[] args) =>
FILE: SDKV4-Samples/dotnet_core/DialogPromptBot/Startup.cs
class Startup (line 24) | public class Startup
method Startup (line 29) | public Startup(IHostingEnvironment env)
method ConfigureServices (line 54) | public void ConfigureServices(IServiceCollection services)
method Configure (line 115) | public void Configure(IApplicationBuilder app, IHostingEnvironment env...
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/ConversationFlow.cs
class ConversationFlow (line 8) | public class ConversationFlow
type Question (line 11) | public enum Question
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBot.cs
class CustomPromptBot (line 28) | public class CustomPromptBot : IBot
method CustomPromptBot (line 40) | public CustomPromptBot(CustomPromptBotAccessors accessors, ILoggerFact...
method OnTurnAsync (line 58) | public async Task OnTurnAsync(ITurnContext turnContext, CancellationTo...
method FillOutUserProfileAsync (line 87) | private static async Task FillOutUserProfileAsync(ConversationFlow flo...
method ValidateName (line 153) | private static bool ValidateName(string input, out string name, out st...
method ValidateAge (line 177) | private static bool ValidateAge(string input, out int age, out string ...
method ValidateDate (line 218) | private static bool ValidateDate(string input, out string date, out st...
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBotAccessors.cs
class CustomPromptBotAccessors (line 15) | public class CustomPromptBotAccessors
method CustomPromptBotAccessors (line 23) | public CustomPromptBotAccessors(ConversationState conversationState, U...
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
method BuildWebHost (line 17) | public static IWebHost BuildWebHost(string[] args) =>
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/Startup.cs
class Startup (line 23) | public class Startup
method Startup (line 28) | public Startup(IHostingEnvironment env)
method ConfigureServices (line 55) | public void ConfigureServices(IServiceCollection services)
method Configure (line 106) | public void Configure(IApplicationBuilder app, IHostingEnvironment env...
FILE: SDKV4-Samples/dotnet_core/PromptUsersForInput/UserProfile.cs
class UserProfile (line 8) | public class UserProfile
FILE: SDKV4-Samples/dotnet_core/StateBot/ConversationData.cs
class ConversationData (line 9) | public class ConversationData
FILE: SDKV4-Samples/dotnet_core/StateBot/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
method BuildWebHost (line 17) | public static IWebHost BuildWebHost(string[] args) =>
FILE: SDKV4-Samples/dotnet_core/StateBot/Startup.cs
class Startup (line 23) | public class Startup
method Startup (line 29) | public Startup(IHostingEnvironment env)
method ConfigureServices (line 56) | public void ConfigureServices(IServiceCollection services)
method Configure (line 107) | public void Configure(IApplicationBuilder app, IHostingEnvironment env...
FILE: SDKV4-Samples/dotnet_core/StateBot/StateBot.cs
class StateBot (line 24) | public class StateBot : IBot
method StateBot (line 35) | public StateBot(StateBotAccessors accessors, ILoggerFactory loggerFact...
method OnTurnAsync (line 53) | public async Task OnTurnAsync(ITurnContext turnContext, CancellationTo...
FILE: SDKV4-Samples/dotnet_core/StateBot/StateBotAccessors.cs
class StateBotAccessors (line 15) | public class StateBotAccessors
method StateBotAccessors (line 23) | public StateBotAccessors(ConversationState conversationState, UserStat...
FILE: SDKV4-Samples/dotnet_core/StateBot/UserProfile.cs
class UserProfile (line 12) | public class UserProfile
FILE: SDKV4-Samples/js/DialogPromptBot/bot.js
constant DIALOG_STATE_ACCESSOR (line 9) | const DIALOG_STATE_ACCESSOR = 'dialogStateAccessor';
constant RESERVATION_ACCESSOR (line 10) | const RESERVATION_ACCESSOR = 'reservationAccessor';
constant RESERVATION_DIALOG (line 13) | const RESERVATION_DIALOG = 'reservationDialog';
constant SIZE_RANGE_PROMPT (line 14) | const SIZE_RANGE_PROMPT = 'rangePrompt';
constant LOCATION_PROMPT (line 15) | const LOCATION_PROMPT = 'locationPrompt';
constant RESERVATION_DATE_PROMPT (line 16) | const RESERVATION_DATE_PROMPT = 'reservationDatePrompt';
class DialogPromptBot (line 18) | class DialogPromptBot {
method constructor (line 23) | constructor(conversationState) {
method onTurn (line 49) | async onTurn(turnContext) {
method promptForPartySize (line 99) | async promptForPartySize(stepContext) {
method promptForLocation (line 109) | async promptForLocation(stepContext) {
method promptForReservationDate (line 121) | async promptForReservationDate(stepContext) {
method acknowledgeReservation (line 132) | async acknowledgeReservation(stepContext) {
method rangeValidator (line 149) | async rangeValidator(promptContext) {
method dateValidator (line 177) | async dateValidator(promptContext) {
FILE: SDKV4-Samples/js/DialogPromptBot/index.js
constant ENV_FILE (line 19) | const ENV_FILE = path.join(__dirname, '.env');
constant DEV_ENVIRONMENT (line 24) | const DEV_ENVIRONMENT = 'development';
constant BOT_CONFIGURATION (line 28) | const BOT_CONFIGURATION = (process.env.NODE_ENV || DEV_ENVIRONMENT);
constant BOT_FILE (line 40) | const BOT_FILE = path.join(__dirname, (process.env.botFilePath || ''));
FILE: SDKV4-Samples/js/PromptUsersForInput/bot.js
constant CONVERSATION_FLOW_PROPERTY (line 8) | const CONVERSATION_FLOW_PROPERTY = 'conversationFlowProperty';
constant USER_PROFILE_PROPERTY (line 9) | const USER_PROFILE_PROPERTY = 'userProfileProperty';
class MyBot (line 20) | class MyBot {
method constructor (line 21) | constructor(conversationState, userState) {
method onTurn (line 32) | async onTurn(turnContext) {
method fillOutUserProfile (line 51) | static async fillOutUserProfile(flow, profile, turnContext) {
method validateName (line 122) | static validateName(input) {
method validateAge (line 131) | static validateAge(input) {
method validateDate (line 161) | static validateDate(input) {
FILE: SDKV4-Samples/js/PromptUsersForInput/index.js
constant ENV_FILE (line 19) | const ENV_FILE = path.join(__dirname, '.env');
constant DEV_ENVIRONMENT (line 24) | const DEV_ENVIRONMENT = 'development';
constant BOT_CONFIGURATION (line 28) | const BOT_CONFIGURATION = (process.env.NODE_ENV || DEV_ENVIRONMENT);
constant BOT_FILE (line 40) | const BOT_FILE = path.join(__dirname, (process.env.botFilePath || ''));
FILE: SDKV4-Samples/js/complexDialogBot/bot.js
constant DIALOG_STATE_PROPERTY (line 8) | const DIALOG_STATE_PROPERTY = 'dialogStateProperty';
constant USER_PROFILE_PROPERTY (line 9) | const USER_PROFILE_PROPERTY = 'userProfileProperty';
constant WELCOME_TEXT (line 11) | const WELCOME_TEXT =
constant TOP_LEVEL_DIALOG (line 16) | const TOP_LEVEL_DIALOG = 'dialog-topLevel';
constant REVIEW_SELECTION_DIALOG (line 17) | const REVIEW_SELECTION_DIALOG = 'dialog-reviewSelection';
constant NAME_PROMPT (line 18) | const NAME_PROMPT = 'prompt-name';
constant AGE_PROMPT (line 19) | const AGE_PROMPT = 'prompt-age';
constant SELECTION_PROMPT (line 20) | const SELECTION_PROMPT = 'prompt-companySelection';
constant DONE_OPTION (line 23) | const DONE_OPTION = 'done';
constant USER_INFO (line 26) | const USER_INFO = 'value-userInfo';
constant COMPANIES_SELECTED (line 27) | const COMPANIES_SELECTED = 'value-companiesSelected';
constant COMPANY_OPTIONS (line 30) | const COMPANY_OPTIONS = [
class MyBot (line 34) | class MyBot {
method constructor (line 40) | constructor(conversationState, userState) {
method onTurn (line 72) | async onTurn(turnContext) {
method sendWelcomeMessage (line 111) | async sendWelcomeMessage(turnContext) {
method nameStep (line 119) | async nameStep(stepContext) {
method ageStep (line 127) | async ageStep(stepContext) {
method startSelectionStep (line 135) | async startSelectionStep(stepContext) {
method acknowledgementStep (line 149) | async acknowledgementStep(stepContext) {
method selectionStep (line 161) | async selectionStep(stepContext) {
method loopStep (line 189) | async loopStep(stepContext) {
FILE: SDKV4-Samples/js/complexDialogBot/index.js
constant ENV_FILE (line 19) | const ENV_FILE = path.join(__dirname, '.env');
constant DEV_ENVIRONMENT (line 24) | const DEV_ENVIRONMENT = 'development';
constant BOT_CONFIGURATION (line 28) | const BOT_CONFIGURATION = (process.env.NODE_ENV || DEV_ENVIRONMENT);
constant BOT_FILE (line 40) | const BOT_FILE = path.join(__dirname, (process.env.botFilePath || ''));
FILE: SDKV4-Samples/js/stateBot/bot.js
constant CONVERSATION_DATA_PROPERTY (line 7) | const CONVERSATION_DATA_PROPERTY = 'conversationData';
constant USER_PROFILE_PROPERTY (line 8) | const USER_PROFILE_PROPERTY = 'userProfile';
class MyBot (line 10) | class MyBot {
method constructor (line 15) | constructor(conversationState, userState) {
method onTurn (line 29) | async onTurn(turnContext) {
FILE: SDKV4-Samples/js/stateBot/index.js
constant ENV_FILE (line 19) | const ENV_FILE = path.join(__dirname, '.env');
constant DEV_ENVIRONMENT (line 24) | const DEV_ENVIRONMENT = 'development';
constant BOT_CONFIGURATION (line 28) | const BOT_CONFIGURATION = (process.env.NODE_ENV || DEV_ENVIRONMENT);
constant BOT_FILE (line 40) | const BOT_FILE = path.join(__dirname, (process.env.botFilePath || ''));
FILE: StackOverflow-Bot/DialogAnalyzerFunc/AnalyzeDialog.cs
class AnalyzeDialog (line 18) | public static class AnalyzeDialog
type RequestBody (line 20) | private struct RequestBody
method Run (line 44) | [FunctionName("AnalyzeDialog")]
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Clients/DialogAnalyzerClient.cs
class DialogAnalyzerClient (line 12) | public class DialogAnalyzerClient
method DialogAnalyzerClient (line 17) | public DialogAnalyzerClient(string computerVisionApiRegion, string com...
method AnalyzeDialogAsync (line 30) | public async Task<DialogAnalysisResult> AnalyzeDialogAsync(byte[] imag...
method AnalyzeDialogAsync (line 53) | public async Task<DialogAnalysisResult> AnalyzeDialogAsync(Uri imageUri)
method InterpretResultsAsync (line 73) | private async Task<DialogAnalysisResult> InterpretResultsAsync(Handwri...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Clients/DialogDataInterpreter.cs
class DialogDataInterpreter (line 10) | public class DialogDataInterpreter
method DialogDataInterpreter (line 14) | public DialogDataInterpreter(int height, int width, IEnumerable<ImageT...
method IsValidText (line 59) | private bool IsValidText(string value)
method IsWithin (line 67) | protected bool IsWithin(int target, int buffer, int value)
method SetButtonLabels (line 85) | private void SetButtonLabels()
method SetContentLabels (line 114) | private void SetContentLabels()
method SetTitleLabel (line 134) | private void SetTitleLabel()
class ImageDataGrid (line 171) | protected class ImageDataGrid
method ImageDataGrid (line 173) | public ImageDataGrid(int x, int y, int height, int width)
method Contains (line 189) | public bool Contains(int x, int y)
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Extensions/EnumerableExtensions.cs
class EnumerableExtensions (line 8) | public static class EnumerableExtensions
method ToTuples (line 10) | public static IEnumerable<Tuple<TValue, TValue>> ToTuples<TValue>(this...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Extensions/HttpExtensions.cs
class HttpExtensions (line 11) | public static class HttpExtensions
method AddHeaders (line 16) | public static void AddHeaders(this HttpRequestMessage request, IDictio...
method AddContentAsBytes (line 31) | public static void AddContentAsBytes(this HttpRequestMessage request, ...
method AddContentAsJson (line 44) | public static void AddContentAsJson(this HttpRequestMessage request, o...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Models/ComputerVisionImageAnalysisResult.cs
class ComputerVisionImageAnalysisResult (line 6) | [DataContract]
class ComputerVisionImageCategory (line 22) | [DataContract]
class ComputerVisionImageCaption (line 32) | [DataContract]
class ComputerVisionImageDescription (line 42) | [DataContract]
class ComputerVisionImageMetadata (line 52) | [DataContract]
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Models/DialogAnalysisResult.cs
class DialogAnalysisResult (line 8) | [DataContract]
class DialogLabel (line 40) | [DataContract]
type DialogLabelTypes (line 43) | public enum DialogLabelTypes
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Models/HandwritingRecognitionResult.cs
type HandwritingRecognitionOperationResult (line 10) | [DataContract]
type HandwritingRecognitionOperationStatus (line 13) | public enum HandwritingRecognitionOperationStatus
type HandwritingRecognitionResult (line 28) | [DataContract]
type HandwritingRecognitionText (line 35) | [DataContract]
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Models/ImageTextRegion.cs
class ImageTextRegion (line 6) | [DataContract]
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Models/TextAnalyticsResult.cs
class TextAnalyticsResult (line 6) | [DataContract]
class TextAnalyticsKeyPhrasesResult (line 13) | [DataContract]
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Services/ComputerVisionService.cs
class ComputerVisionService (line 14) | public class ComputerVisionService
method ComputerVisionService (line 26) | public ComputerVisionService(string apiRegion, string subscriptionKey)
method AnalyzeImageAsync (line 48) | public async Task<ComputerVisionImageAnalysisResult> AnalyzeImageAsync...
method AnalyzeImageAsync (line 66) | public async Task<ComputerVisionImageAnalysisResult> AnalyzeImageAsync...
method RecognizeHandwrittenTextAsync (line 84) | public async Task<HandwritingRecognitionResult> RecognizeHandwrittenTe...
method RecognizeHandwrittenTextAsync (line 103) | public async Task<HandwritingRecognitionResult> RecognizeHandwrittenTe...
method GetResultFromOperationResponse (line 119) | private async Task<HandwritingRecognitionResult> GetResultFromOperatio...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Services/TextAnalyticsService.cs
class TextAnalyticsService (line 10) | public class TextAnalyticsService
method TextAnalyticsService (line 19) | public TextAnalyticsService(string apiRegion, string subscriptionKey)
method AnalyzeKeyPhrasesAsync (line 41) | public async Task<TextAnalyticsResult<TextAnalyticsKeyPhrasesResult>> ...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Utilities/HttpClientUtility.cs
class HttpClientUtility (line 13) | public static class HttpClientUtility
method HttpClientUtility (line 23) | static HttpClientUtility()
method GetAsync (line 34) | public static async Task<TResult> GetAsync<TResult>(Uri requestUri, ID...
method GetAsync (line 50) | public static async Task<HttpResponseMessage> GetAsync(Uri requestUri,...
method PostAsBytesAsync (line 71) | public static async Task<TResult> PostAsBytesAsync<TResult>(Uri reques...
method PostAsJsonAsync (line 85) | public static async Task<TResult> PostAsJsonAsync<TResult>(Uri request...
method PostAsBytesAsync (line 99) | public static async Task<HttpResponseMessage> PostAsBytesAsync(Uri req...
method PostAsJsonAsync (line 124) | public static async Task<HttpResponseMessage> PostAsJsonAsync(Uri requ...
method ExecuteActionkWithAutoRetry (line 149) | private static async Task<HttpResponseMessage> ExecuteActionkWithAutoR...
FILE: StackOverflow-Bot/DialogAnalyzerFunc/Utilities/StringUtility.cs
class StringUtility (line 7) | public static class StringUtility
method GetTextOrDefault (line 12) | public static string GetTextOrDefault(IEnumerable<string> values, stri...
FILE: StackOverflow-Bot/StackBot/index.js
constant BOTBUILDER_APP_ID (line 18) | const BOTBUILDER_APP_ID = process.env.BOTBUILDER_APP_ID;
constant BOTBUILDER_APP_PASSWORD (line 19) | const BOTBUILDER_APP_PASSWORD = process.env.BOTBUILDER_APP_PASSWORD;
constant LUIS_MODEL (line 20) | const LUIS_MODEL = process.env.LUIS_MODEL;
constant KB_ID (line 21) | const KB_ID = process.env.KB_ID;
constant QNA_KEY (line 22) | const QNA_KEY = process.env.QNA_KEY;
constant QNA_URL (line 23) | const QNA_URL = process.env.QNA_URL;
constant BING_SEARCH_CONFIG (line 24) | const BING_SEARCH_CONFIG = process.env.BING_SEARCH_CONFIG;
constant BING_SEARCH_KEY (line 25) | const BING_SEARCH_KEY = process.env.BING_SEARCH_KEY;
constant TEXT_ANALYTICS_KEY (line 26) | const TEXT_ANALYTICS_KEY = process.env.TEXT_ANALYTICS_KEY;
constant TEXT_ANALYTICS_URL (line 27) | const TEXT_ANALYTICS_URL = process.env.TEXT_ANALYTICS_URL;
constant DIALOG_ANALYZER_CLIENTID (line 28) | const DIALOG_ANALYZER_CLIENTID = process.env.DIALOG_ANALYZER_CLIENTID;
constant DIALOG_ANALYZER_KEY (line 29) | const DIALOG_ANALYZER_KEY = process.env.DIALOG_ANALYZER_KEY;
constant DIALOG_ANALYZER_URL (line 30) | const DIALOG_ANALYZER_URL = process.env.DIALOG_ANALYZER_URL;
FILE: StackOverflow-Bot/StackBot/lib/bingsearchclient.js
function BingSearchClient (line 3) | function BingSearchClient (opts) {
FILE: StackOverflow-Bot/StackBot/lib/dialoganalyzerclient.js
function DialogAnalyzerClient (line 4) | function DialogAnalyzerClient (opts) {
FILE: StackOverflow-Bot/StackBot/lib/qnaclient.js
constant QNA_MAKER_URL (line 3) | const QNA_MAKER_URL = `${process.env.QNA_URL}/knowledgebases`;
function Client (line 5) | function Client (opts) {
FILE: StackOverflow-Bot/StackBot/lib/sentimentanalyzerclient.js
function SentimentAnalyzerClient (line 3) | function SentimentAnalyzerClient (opts) {
FILE: StackOverflow-Bot/StackCode/out/src/extension.js
constant PORT (line 7) | const PORT = 4567;
function activate (line 34) | function activate(context) {
method provideTextDocumentContent (line 85) | provideTextDocumentContent(uri, cancellationToken) {
FILE: StackOverflow-Bot/StackCode/src/extension.ts
constant PORT (line 10) | const PORT = 4567;
function activate (line 45) | function activate(context: vscode.ExtensionContext) {
method provideTextDocumentContent (line 101) | provideTextDocumentContent (uri, cancellationToken) {
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/App_Start/WebApiConfig.cs
class WebApiConfig (line 10) | public static class WebApiConfig
method Register (line 12) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 31) | private async Task<Activity> HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Dialogs/RootDialog.cs
class RootDialog (line 9) | [Serializable]
method StartAsync (line 12) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 21) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
class BotDataInfo (line 45) | public class BotDataInfo
method IncrementInfoCount (line 50) | private BotDataInfo IncrementInfoCount(IBotDataBag botdata, string key)
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.Designer.cs
class InitialSetup (line 9) | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.cs
class InitialSetup (line 6) | public partial class InitialSetup : DbMigration
method Up (line 8) | public override void Up()
method Down (line 32) | public override void Down()
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/Configuration.cs
class Configuration (line 8) | internal sealed class Configuration : DbMigrationsConfiguration<Microsof...
method Configuration (line 10) | public Configuration()
method Seed (line 15) | protected override void Seed(Microsoft.Bot.Sample.AzureSql.SqlStateSer...
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataContext.cs
class SqlBotDataContext (line 6) | public class SqlBotDataContext : DbContext
method SqlBotDataContext (line 8) | public SqlBotDataContext()
method SqlBotDataContext (line 12) | public SqlBotDataContext(string connectionStringName)
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataEntity.cs
class SqlBotDataEntity (line 15) | public class SqlBotDataEntity : IAddress
method SqlBotDataEntity (line 22) | internal SqlBotDataEntity() { }
method SqlBotDataEntity (line 23) | internal SqlBotDataEntity(BotStoreType botStoreType, string botId, str...
method Serialize (line 66) | private static byte[] Serialize(object data)
method Deserialize (line 80) | private static object Deserialize(byte[] bytes)
method GetData (line 90) | internal ObjectT GetData<ObjectT>()
method GetData (line 95) | internal object GetData()
method GetSqlBotDataEntity (line 99) | internal static SqlBotDataEntity GetSqlBotDataEntity(IAddress key, Bot...
FILE: blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataStore.cs
class SqlBotDataStore (line 12) | public class SqlBotDataStore : IBotDataStore<BotData>
method SqlBotDataStore (line 15) | public SqlBotDataStore(string connectionStringName)
method LoadAsync (line 20) | async Task<BotData> IBotDataStore<BotData>.LoadAsync(IAddress key, Bot...
method SaveAsync (line 40) | async Task IBotDataStore<BotData>.SaveAsync(IAddress key, BotStoreType...
method FlushAsync (line 104) | Task<bool> IBotDataStore<BotData>.FlushAsync(IAddress key, Cancellatio...
FILE: blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/App_Start/WebApiConfig.cs
class WebApiConfig (line 7) | public static class WebApiConfig
method Register (line 9) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 31) | private Activity HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Dialogs/FeedbackDialog.cs
class FeedbackDialog (line 10) | [Serializable]
method FeedbackDialog (line 16) | public FeedbackDialog(string url, string question)
method StartAsync (line 23) | public async Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 41) | public async Task MessageReceivedAsync(IDialogContext context, IAwaita...
FILE: blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Dialogs/QnADialog.cs
class QnaDialog (line 13) | [Serializable]
method QnaDialog (line 16) | public QnaDialog() : base(new QnAMakerService(new QnAMakerAttribute(Co...
method RespondFromQnAMakerResultAsync (line 20) | protected override async Task RespondFromQnAMakerResultAsync(IDialogCo...
method DefaultWaitNextMessageAsync (line 57) | protected override async Task DefaultWaitNextMessageAsync(IDialogConte...
method ResumeAfterFeedback (line 71) | private async Task ResumeAfterFeedback(IDialogContext context, IAwaita...
FILE: blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/DocumentDbBotDataStore.cs
class DocumentDbBotDataStore (line 57) | public class DocumentDbBotDataStore : IBotDataStore<BotData>
method DocumentDbBotDataStore (line 75) | public DocumentDbBotDataStore(IDocumentClient documentClient, string d...
method DocumentDbBotDataStore (line 101) | public DocumentDbBotDataStore(Uri serviceEndpoint, string authKey, str...
method LoadAsync (line 104) | async Task<BotData> IBotDataStore<BotData>.LoadAsync(IAddress key, Bot...
method SaveAsync (line 149) | async Task IBotDataStore<BotData>.SaveAsync(IAddress key, BotStoreType...
method FlushAsync (line 204) | Task<bool> IBotDataStore<BotData>.FlushAsync(IAddress key, Cancellatio...
method CreateDatabaseIfNotExistsAsync (line 210) | private async Task CreateDatabaseIfNotExistsAsync()
method CreateCollectionIfNotExistsAsync (line 229) | private async Task CreateCollectionIfNotExistsAsync()
class BotDataDocDbKey (line 251) | internal class BotDataDocDbKey
method BotDataDocDbKey (line 253) | public BotDataDocDbKey(string partition, string row)
class DocDbBotDataEntity (line 264) | internal class DocDbBotDataEntity
method DocDbBotDataEntity (line 267) | public DocDbBotDataEntity() { }
method DocDbBotDataEntity (line 269) | internal DocDbBotDataEntity(IAddress key, BotStoreType botStoreType, B...
method GetEntityKey (line 279) | public static string GetEntityKey(IAddress key, BotStoreType botStoreT...
method TruncateEntityKey (line 301) | private static string TruncateEntityKey(string entityKey)
class StringExtensions (line 312) | internal static class StringExtensions
FILE: blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/Extensions.cs
class StringExtensions (line 5) | internal static class StringExtensions
method SanitizeForAzureKeys (line 9) | internal static string SanitizeForAzureKeys(this string input, Diction...
FILE: blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/Program.cs
class Options (line 14) | class Options
class Program (line 44) | class Program
method Main (line 47) | static void Main(string[] args)
method DoExport (line 80) | public static async Task<bool> DoExport(Options opts)
FILE: blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/TableBotDataStore.cs
class TableBotDataStore (line 56) | public class TableBotDataStore : IBotDataStore<BotData>
method TableBotDataStore (line 65) | public TableBotDataStore(string connectionString, string tableName = "...
method TableBotDataStore (line 75) | public TableBotDataStore(CloudStorageAccount storageAccount, string ta...
method TableBotDataStore (line 94) | public TableBotDataStore(CloudTable table)
method LoadAsync (line 104) | async Task<BotData> IBotDataStore<BotData>.LoadAsync(IAddress key, Bot...
method SaveAsync (line 124) | async Task IBotDataStore<BotData>.SaveAsync(IAddress key, BotStoreType...
method FlushAsync (line 162) | Task<bool> IBotDataStore<BotData>.FlushAsync(IAddress key, Cancellatio...
class EntityKey (line 170) | internal class EntityKey
method EntityKey (line 172) | public EntityKey(string partition, string row)
class BotDataEntity (line 183) | internal class BotDataEntity : TableEntity
method BotDataEntity (line 191) | public BotDataEntity()
method BotDataEntity (line 195) | internal BotDataEntity(string botId, string channelId, string conversa...
method Serialize (line 204) | private byte[] Serialize(object data)
method Deserialize (line 218) | private object Deserialize(byte[] bytes)
method GetEntityKey (line 229) | internal static EntityKey GetEntityKey(IAddress key, BotStoreType botS...
method GetData (line 247) | internal ObjectT GetData<ObjectT>()
method GetData (line 252) | internal object GetData()
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-DocumentDB-Custom-State/App_Start/WebApiConfig.cs
class WebApiConfig (line 10) | public static class WebApiConfig
method Register (line 12) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-DocumentDB-Custom-State/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 31) | private Activity HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-DocumentDB-Custom-State/Dialogs/RootDialog.cs
class RootDialog (line 8) | [Serializable]
method StartAsync (line 11) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 18) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-DocumentDB-Custom-State/Global.asax.cs
class WebApiApplication (line 13) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 15) | protected void Application_Start()
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-Table-Custom-State/App_Start/WebApiConfig.cs
class WebApiConfig (line 10) | public static class WebApiConfig
method Register (line 12) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-Table-Custom-State/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 31) | private Activity HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-Table-Custom-State/Dialogs/RootDialog.cs
class RootDialog (line 8) | [Serializable]
method StartAsync (line 11) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 18) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-Table-Custom-State/Global.asax.cs
class WebApiApplication (line 12) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 14) | protected void Application_Start()
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookPassThreadControl.cs
class FacebookPassThreadControl (line 13) | public class FacebookPassThreadControl
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookPayload.cs
class FacebookPayload (line 11) | public class FacebookPayload
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookPsid.cs
class FacebookPsid (line 11) | public class FacebookPsid
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookRequestThreadControl.cs
class FacebookRequestThreadControl (line 13) | public class FacebookRequestThreadControl
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookStandby.cs
class FacebookStandbys (line 13) | public class FacebookStandbys
class FacebookStandby (line 23) | public class FacebookStandby
class FacebookStandByMessage (line 35) | public class FacebookStandByMessage
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookTakeThreadControl.cs
class FacebookTakeThreadControl (line 13) | public class FacebookTakeThreadControl
FILE: blog-samples/CSharp/FacebookHandover/FacebookModel/FacebookThreadControlHelper.cs
class FacebookThreadControlHelper (line 16) | public static class FacebookThreadControlHelper
method PostToFacebookAPIAsync (line 22) | private static async Task<bool> PostToFacebookAPIAsync(string postType...
method GetSecondaryReceiversAsync (line 45) | public static async Task<List<string>> GetSecondaryReceiversAsync(stri...
method RequestThreadControlAsync (line 68) | public static async Task<bool> RequestThreadControlAsync(string pageTo...
method TakeThreadControlAsync (line 74) | public static async Task<bool> TakeThreadControlAsync(string pageToken...
method PassThreadControlAsync (line 80) | public static async Task<bool> PassThreadControlAsync(string pageToken...
method ApplyFacebookPayload (line 91) | public static void ApplyFacebookPayload(this ITurnContext turnContext,...
FILE: blog-samples/CSharp/FacebookHandover/Primary/Bots/PrimaryBot.cs
class PrimaryBot (line 26) | public class PrimaryBot : ActivityHandler
method PrimaryBot (line 69) | public PrimaryBot(ILogger<PrimaryBot> logger, IConfiguration configura...
method OnMessageActivityAsync (line 75) | protected override async Task OnMessageActivityAsync(ITurnContext<IMes...
method OnConversationUpdateActivityAsync (line 113) | protected override async Task OnConversationUpdateActivityAsync(ITurnC...
method OnEventActivityAsync (line 130) | protected override async Task OnEventActivityAsync(ITurnContext<IEvent...
method ProcessFacebookMessage (line 138) | private async Task<bool> ProcessFacebookMessage(ITurnContext turnConte...
method ProcessStandbyPayload (line 144) | private async Task<bool> ProcessStandbyPayload(ITurnContext turnContex...
method OnFacebookStandby (line 163) | protected virtual async Task OnFacebookStandby(ITurnContext turnContex...
method ProcessFacebookPayload (line 175) | private async Task<bool> ProcessFacebookPayload(ITurnContext turnConte...
method OnFacebookThreadControlRequest (line 206) | protected virtual async Task OnFacebookThreadControlRequest(ITurnConte...
method ShowChoices (line 236) | private static async Task ShowChoices(ITurnContext turnContext, Cancel...
FILE: blog-samples/CSharp/FacebookHandover/Primary/Controllers/BotController.cs
class BotController (line 16) | [Route("api/messages")]
method BotController (line 23) | public BotController(IBotFrameworkHttpAdapter adapter, IBot bot)
method PostAsync (line 29) | [HttpPost]
FILE: blog-samples/CSharp/FacebookHandover/Primary/Program.cs
class Program (line 11) | public class Program
method Main (line 13) | public static void Main(string[] args)
method CreateWebHostBuilder (line 18) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: blog-samples/CSharp/FacebookHandover/Primary/Startup.cs
class Startup (line 20) | public class Startup
method Startup (line 22) | public Startup(IConfiguration configuration)
method ConfigureServices (line 30) | public void ConfigureServices(IServiceCollection services)
method Configure (line 45) | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
FILE: blog-samples/CSharp/FacebookHandover/Secondary/Bots/SecondaryBot.cs
class SecondaryBot (line 21) | public class SecondaryBot : ActivityHandler
method SecondaryBot (line 54) | public SecondaryBot(ILogger<SecondaryBot> logger, IConfiguration confi...
method OnMessageActivityAsync (line 60) | protected override async Task OnMessageActivityAsync(ITurnContext<IMes...
method OnConversationUpdateActivityAsync (line 82) | protected override async Task OnConversationUpdateActivityAsync(ITurnC...
method OnEventActivityAsync (line 105) | protected override async Task OnEventActivityAsync(ITurnContext<IEvent...
method ProcessStandbyPayload (line 113) | private async Task ProcessStandbyPayload(ITurnContext turnContext, obj...
method OnFacebookStandby (line 128) | protected virtual async Task OnFacebookStandby(ITurnContext turnContex...
method ShowChoices (line 144) | private static async Task ShowChoices(ITurnContext turnContext, Cancel...
FILE: blog-samples/CSharp/FacebookHandover/Secondary/Controllers/BotController.cs
class BotController (line 16) | [Route("api/messages")]
method BotController (line 23) | public BotController(IBotFrameworkHttpAdapter adapter, IBot bot)
method PostAsync (line 29) | [HttpPost]
FILE: blog-samples/CSharp/FacebookHandover/Secondary/Program.cs
class Program (line 11) | public class Program
method Main (line 13) | public static void Main(string[] args)
method CreateWebHostBuilder (line 18) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: blog-samples/CSharp/FacebookHandover/Secondary/Startup.cs
class Startup (line 20) | public class Startup
method Startup (line 22) | public Startup(IConfiguration configuration)
method ConfigureServices (line 30) | public void ConfigureServices(IServiceCollection services)
method Configure (line 45) | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/App_Start/WebApiConfig.cs
class WebApiConfig (line 10) | public static class WebApiConfig
method Register (line 12) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 31) | private Activity HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/CommonResponsesDialog.cs
class CommonResponsesDialog (line 11) | public class CommonResponsesDialog : IDialog<object>
method CommonResponsesDialog (line 16) | public CommonResponsesDialog(string message)
method CommonResponsesDialog (line 22) | public CommonResponsesDialog(Activity activity)
method StartAsync (line 40) | public async Task StartAsync(IDialogContext context)
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/CommonResponsesScorable.cs
class CommonResponsesScorable (line 11) | public partial class CommonResponsesScorable : ScorableBase<IActivity, s...
method CommonResponsesScorable (line 15) | public CommonResponsesScorable(IDialogTask task)
method PrepareAsync (line 20) | protected override async Task<string> PrepareAsync(IActivity activity,...
method HasScore (line 45) | protected override bool HasScore(IActivity item, string state)
method GetScore (line 50) | protected override double GetScore(IActivity item, string state)
method PostAsync (line 55) | protected override async Task PostAsync(IActivity item, string state, ...
method DoneAsync (line 87) | protected override Task DoneAsync(IActivity item, string state, Cancel...
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/JokeDialog.cs
class JokeDialog (line 10) | [Serializable]
method StartAsync (line 13) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 23) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/LuisDialog.cs
class LuisDialog (line 11) | [Serializable]
method None (line 15) | [LuisIntent("")]
method Greeting (line 28) | [LuisIntent("greeting")]
method after (line 38) | private ResumeAfter<object> after()
method Middle (line 43) | [LuisIntent("weather")]
method Joke (line 54) | [LuisIntent("joke")]
method QnA (line 65) | [LuisIntent("question")]
method ResumeAfterQnA (line 76) | private async Task ResumeAfterQnA(IDialogContext context, IAwaitable<o...
method ResumeAfterJokeDialog (line 81) | private async Task ResumeAfterJokeDialog(IDialogContext context, IAwai...
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/QnaDialog.cs
class QnaDialog (line 13) | public class QnaDialog : QnAMakerDialog
method QnaDialog (line 15) | public QnaDialog(): base(
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Dialogs/RootDialog.cs
class RootDialog (line 9) | [Serializable]
method StartAsync (line 12) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 19) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
method ResumeAftelLuisDialog (line 25) | private async Task ResumeAftelLuisDialog(IDialogContext context, IAwai...
FILE: blog-samples/CSharp/Luis-Scorable-QnA/Luis-Scorable-Qna/Global.asax.cs
class WebApiApplication (line 19) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 21) | protected void Application_Start()
method RegisterBotModules (line 28) | private void RegisterBotModules()
class GlobalMessageHandlersBotModule (line 40) | public class GlobalMessageHandlersBotModule : Module
method Load (line 42) | protected override void Load(ContainerBuilder builder)
FILE: blog-samples/CSharp/MockChannel/App_Start/WebApiConfig.cs
class WebApiConfig (line 8) | public static class WebApiConfig
method Register (line 10) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/MockChannel/Controllers/MockChannelController.cs
class MockChannelController (line 13) | [RoutePrefix("v3/conversations")]
method CreateConversation (line 23) | [HttpPost]
method SendToConversation (line 40) | [HttpPost]
method ReplyToActivity (line 57) | [HttpPost]
method UpdateActivity (line 74) | [HttpPut]
method DeleteActivity (line 89) | [HttpDelete]
method GetConversationMembers (line 103) | [HttpGet]
method GetActivityMembers (line 118) | [HttpGet]
method UploadAttachment (line 133) | [HttpPost]
FILE: blog-samples/CSharp/MockChannel/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/AnswerFormats/JsonQnaAnswer.cs
class JsonQnaAnswer (line 8) | public class JsonQnaAnswer
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/App_Start/WebApiConfig.cs
class WebApiConfig (line 7) | public static class WebApiConfig
method Register (line 9) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/Controllers/MessagesController.cs
class MessagesController (line 10) | [BotAuthentication]
method Post (line 17) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 32) | private Activity HandleSystemMessage(Activity message)
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/Dialogs/QnaDialog.cs
class QnaDialog (line 14) | [Serializable]
method QnaDialog (line 17) | public QnaDialog() : base(new QnAMakerService(new QnAMakerAttribute(Co...
method RespondFromQnAMakerResultAsync (line 21) | protected override async Task RespondFromQnAMakerResultAsync(IDialogCo...
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/Dialogs/RootDialog.cs
class RootDialog (line 8) | [Serializable]
method StartAsync (line 11) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 18) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/Qna-Rich-Cards/Qna-Rich-Cards/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/App_Start/WebApiConfig.cs
class WebApiConfig (line 7) | public static class WebApiConfig
method Register (line 9) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Controllers/MessagesController.cs
class MessagesController (line 13) | [BotAuthentication]
method Post (line 16) | public async Task<HttpResponseMessage> Post([FromBody] Activity activity)
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/Balance/Current/CheckBalanceCurrentDialog.cs
class CheckBalanceCurrentDialog (line 10) | [Serializable]
method StartAsync (line 14) | public async Task StartAsync(IDialogContext context)
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/Balance/Savings/CheckBalanceSavingsDialog.cs
class CheckBalanceSavingsDialog (line 10) | [Serializable]
method StartAsync (line 13) | public async Task StartAsync(IDialogContext context)
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/Balance/ScorableCheckBalance.cs
class ScorableCheckBalance (line 11) | public class ScorableCheckBalance : ScorableBase<IActivity, string, double>
method ScorableCheckBalance (line 15) | public ScorableCheckBalance(IDialogStack stack)
method DoneAsync (line 20) | protected override Task DoneAsync(IActivity item, string state, Cancel...
method GetScore (line 25) | protected override double GetScore(IActivity item, string state)
method HasScore (line 30) | protected override bool HasScore(IActivity item, string state)
method PostAsync (line 35) | protected override Task PostAsync(IActivity item, string state, Cancel...
method PrepareAsync (line 44) | protected override async Task<string> PrepareAsync(IActivity item, Can...
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/Balance/ScorableCheckBalanceDialog.cs
class ScorableCheckBalanceDialog (line 10) | [Serializable]
method StartAsync (line 14) | public async Task StartAsync(IDialogContext context)
method MessageReceivedOperationChoice (line 21) | public async Task MessageReceivedOperationChoice(IDialogContext contex...
method AfterChildDialogIsDone (line 44) | private async Task AfterChildDialogIsDone(IDialogContext context, IAwa...
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/MakePayment/ScorableMakePayment.cs
class ScorableMakePayment (line 11) | public class ScorableMakePayment : ScorableBase<IActivity, string, double>
method ScorableMakePayment (line 15) | public ScorableMakePayment(IDialogStack stack)
method DoneAsync (line 20) | protected override Task DoneAsync(IActivity item, string state, Cancel...
method GetScore (line 25) | protected override double GetScore(IActivity item, string state)
method HasScore (line 30) | protected override bool HasScore(IActivity item, string state)
method PostAsync (line 35) | protected override Task PostAsync(IActivity item, string state, Cancel...
method PrepareAsync (line 44) | protected override async Task<string> PrepareAsync(IActivity item, Can...
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/MakePayment/ScorableMakePaymentDialog.cs
class ScorableMakePaymentDialog (line 8) | [Serializable]
method StartAsync (line 15) | public async Task StartAsync(IDialogContext context)
method MessageReceivedPayee (line 23) | public async Task MessageReceivedPayee(IDialogContext context, IAwaita...
method MessageReceivedAmount (line 34) | public async Task MessageReceivedAmount(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Dialogs/RootDialog.cs
class RootDialog (line 8) | [Serializable]
method StartAsync (line 11) | public Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 20) | private async Task MessageReceivedAsync(IDialogContext context, IAwait...
FILE: blog-samples/CSharp/ScorableBotSample/ScorableBot/Global.asax.cs
class WebApiApplication (line 12) | public class WebApiApplication : HttpApplication
method Application_Start (line 14) | protected void Application_Start()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/App.xaml.cs
class App (line 14) | sealed partial class App : Application
method App (line 20) | public App()
method HandleCommonActivation (line 26) | private Frame HandleCommonActivation(IActivatedEventArgs args)
method OnLaunched (line 56) | protected override void OnLaunched(LaunchActivatedEventArgs args)
method OnActivated (line 87) | protected override void OnActivated(IActivatedEventArgs args)
method OnNavigationFailed (line 117) | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
method OnSuspending (line 129) | private void OnSuspending(object sender, SuspendingEventArgs e)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/BotConnection.cs
class BotConnection (line 5) | public static class BotConnection
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/Converters/BoolToVisibilityConverter.cs
class BoolToVisibilityConverter (line 9) | public class BoolToVisibilityConverter : IValueConverter
method Convert (line 11) | public object Convert(object value, Type targetType, object parameter,...
method ConvertBack (line 29) | public object ConvertBack(object value, Type targetType, object parame...
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/MainPage.xaml.cs
class MainPage (line 23) | public sealed partial class MainPage : Page
method MainPage (line 57) | public MainPage()
method OnNavigatedTo (line 103) | protected override async void OnNavigatedTo(NavigationEventArgs e)
type MessageSource (line 157) | private enum MessageSource
method RunOnUi (line 163) | private IAsyncAction RunOnUi(Windows.UI.Core.DispatchedHandler action)
method OnSpeechRecognitionStarted (line 168) | private async void OnSpeechRecognitionStarted(object sender, EventArgs...
method OnIntermediateSpeechRecognitionResultReceived (line 177) | private async void OnIntermediateSpeechRecognitionResultReceived(objec...
method OnSpeechRecognitionEnded (line 185) | private async void OnSpeechRecognitionEnded(object sender, EventArgs e...
method OnFinalSpeechRecognitionResultReceived (line 193) | private async void OnFinalSpeechRecognitionResultReceived(object sende...
method OnConversationUpdated (line 202) | private async void OnConversationUpdated(object sender, Activity e) =>...
method UpdateAnswerCards (line 292) | private void UpdateAnswerCards()
method OnSpeechSynthesisEnded (line 298) | private async void OnSpeechSynthesisEnded(object sender, EventArgs e) ...
method UpdateCountdown (line 310) | private async void UpdateCountdown(object sender, PropertyChangedEvent...
method AddChatMessage (line 335) | private void AddChatMessage(MessageSource messageSource, string message)
method TextBox_KeyPressedEventHandler (line 357) | private async void TextBox_KeyPressedEventHandler(object sender, KeyRo...
method StackPanel_LayoutUpdated (line 375) | private void StackPanel_LayoutUpdated(object sender, object e)
method MicButton_Click (line 385) | private void MicButton_Click(object sender, RoutedEventArgs e)
method AnswerOptions_SelectionChanged (line 399) | private async void AnswerOptions_SelectionChanged(object sender, Selec...
method SetCategory (line 416) | private async Task SetCategory(string category)
method CategoryFilm_Click (line 437) | private async void CategoryFilm_Click(object sender, RoutedEventArgs e)
method CategoryAnimals_Click (line 442) | private async void CategoryAnimals_Click(object sender, RoutedEventArg...
method CategoryScience_Click (line 447) | private async void CategoryScience_Click(object sender, RoutedEventArg...
method CategoryAll_Click (line 452) | private async void CategoryAll_Click(object sender, RoutedEventArgs e)
method CategoryGeography_Click (line 457) | private async void CategoryGeography_Click(object sender, RoutedEventA...
method CategoryMusic_Click (line 462) | private async void CategoryMusic_Click(object sender, RoutedEventArgs e)
method CategoryArt_Click (line 467) | private async void CategoryArt_Click(object sender, RoutedEventArgs e)
method LightningModeButton_Click (line 472) | private void LightningModeButton_Click(object sender, RoutedEventArgs e)
method Pivot_SelectionChanged (line 487) | private void Pivot_SelectionChanged(object sender, SelectionChangedEve...
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/ViewModels/AnswerCard.cs
class AnswerCard (line 3) | internal class AnswerCard
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/ViewModels/ChatCard.cs
class ChatCard (line 5) | internal class ChatCard
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/ViewModels/CountdownTimer.cs
class CountdownTimer (line 7) | internal class CountdownTimer : INotifyPropertyChanged
method CountdownTimer (line 13) | public CountdownTimer()
method Start (line 37) | public void Start(TimeSpan remainingTime)
method Reset (line 43) | public void Reset()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaApp/ViewModels/ObservableDictionary.cs
class ObservableDictionary (line 13) | public class ObservableDictionary : IObservableMap<string, object>
method Contains (line 93) | public bool Contains(KeyValuePair<string, object> item)
method ContainsKey (line 103) | public bool ContainsKey(string key)
method TryGetValue (line 114) | public bool TryGetValue(string key, out object value)
method Add (line 124) | public void Add(string key, object value)
method Add (line 134) | public void Add(KeyValuePair<string, object> item)
method Remove (line 144) | public bool Remove(string key)
method Remove (line 160) | public bool Remove(KeyValuePair<string, object> item)
method Clear (line 176) | public void Clear()
method GetEnumerator (line 191) | public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
method GetEnumerator (line 200) | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnume...
method CopyTo (line 210) | public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
method InvokeMapChanged (line 229) | private void InvokeMapChanged(CollectionChange change, string key)
class ObservableDictionaryChangedEventArgs (line 237) | private class ObservableDictionaryChangedEventArgs : IMapChangedEventA...
method ObservableDictionaryChangedEventArgs (line 244) | public ObservableDictionaryChangedEventArgs(CollectionChange change,...
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/App_Start/WebApiConfig.cs
class WebApiConfig (line 9) | public static class WebApiConfig
method Register (line 11) | public static void Register(HttpConfiguration config)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Controllers/MessagesController.cs
class MessagesController (line 13) | [BotAuthentication]
method Post (line 20) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleActivity (line 35) | private async Task<bool> HandleActivity(Activity activity)
method HandleMessageActivity (line 70) | private async Task HandleMessageActivity(Activity message)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Luis/LuisEntity.cs
class LuisEntity (line 12) | [DataContract]
method LuisEntity (line 24) | public LuisEntity(string entity, string type, int startIndex, int endI...
method Compare (line 124) | public static int Compare(LuisEntity left, LuisEntity right)
method ToString (line 143) | public override string ToString()
method CompareTo (line 154) | public int CompareTo(object obj)
method CompareTo (line 182) | public int CompareTo(LuisEntity other)
method Equals (line 224) | public override bool Equals(object obj)
method GetHashCode (line 241) | public override int GetHashCode()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Luis/LuisIntent.cs
class LuisIntent (line 11) | [DataContract]
method Compare (line 81) | public static int Compare(LuisIntent left, LuisIntent right)
method ToString (line 100) | public override string ToString()
method CompareTo (line 110) | public int CompareTo(object obj)
method CompareTo (line 132) | public int CompareTo(LuisIntent other)
method Equals (line 154) | public override bool Equals(object obj)
method GetHashCode (line 171) | public override int GetHashCode()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Luis/LuisResult.cs
class LuisResult (line 11) | [DataContract]
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Luis/QueryLuis.cs
class QueryLuis (line 17) | public static class QueryLuis
method GetIntentAndEntitiesFromLuis (line 25) | public static async Task<LuisResult> GetIntentAndEntitiesFromLuis(
method QueryLuisWithRetry (line 50) | private static async Task<LuisResult> QueryLuisWithRetry(
method CallLuis (line 96) | private static async Task<LuisResult> CallLuis(
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/BotState.cs
type BotState (line 5) | public enum BotState
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/Categories.cs
type TriviaCategory (line 10) | public enum TriviaCategory
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/EnumExtensions.cs
class EnumExtensions (line 9) | public static class EnumExtensions
method DisplayName (line 11) | public static string DisplayName(this Enum value)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/Extensions.cs
class Extensions (line 8) | public static class Extensions
method Normalize (line 10) | public static string Normalize(this string msg)
method NormalizedEquals (line 15) | public static bool NormalizedEquals(this string msg, string other)
method ContainsIgnoreCase (line 20) | public static bool ContainsIgnoreCase(this string msg, IEnumerable<str...
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/Responses.cs
class Responses (line 20) | public static class Responses
method Send_LetsGo (line 22) | public async static Task Send_LetsGo(IDialogContext context, IMessageA...
method Send_Goodbye (line 35) | public async static Task Send_Goodbye(IDialogContext context, IMessage...
method Send_TimeForNextQuestion (line 47) | public async static Task Send_TimeForNextQuestion(IDialogContext conte...
method Send_Greeting (line 64) | public async static Task Send_Greeting(IDialogContext context, IMessag...
method Send_FirstQuestion (line 86) | public async static Task Send_FirstQuestion(IDialogContext context, IM...
method SendQuestion (line 99) | public async static Task SendQuestion(IDialogContext context, IMessage...
method Send_DidNotUnderstand (line 114) | public async static Task Send_DidNotUnderstand(IDialogContext context,...
method Send_WhichOne (line 127) | public async static Task Send_WhichOne(IDialogContext context, IMessag...
method AskForCategory (line 146) | public async static Task AskForCategory(IDialogContext context, IMessa...
method Send_ConfirmAnswer (line 161) | public async static Task Send_ConfirmAnswer(IDialogContext context, IM...
method Send_CorrectAnswer (line 174) | public async static Task Send_CorrectAnswer(IDialogContext context, IM...
method Send_OutOfTime_First (line 192) | public async static Task Send_OutOfTime_First(IDialogContext context, ...
method Send_OutOfTime_X (line 209) | public async static Task Send_OutOfTime_X(IDialogContext context, IMes...
method Send_TryEasierQuestion (line 227) | public async static Task Send_TryEasierQuestion(IDialogContext context...
method Send_IncorrectAnswer (line 244) | public async static Task Send_IncorrectAnswer(IDialogContext context, ...
method Send_Help_Game (line 262) | public async static Task Send_Help_Game(IDialogContext context, IMessa...
method Send_Help_Trivia (line 275) | public async static Task Send_Help_Trivia(IDialogContext context, IMes...
method Send_Help_Trivia (line 288) | public async static Task Send_Help_Trivia(IDialogContext context, IMes...
method Send_Error_UnknownState (line 304) | public async static Task Send_Error_UnknownState(IDialogContext contex...
method Send_Error_NextQuestion (line 317) | public async static Task Send_Error_NextQuestion(IDialogContext contex...
method Send_PlayingCategory (line 330) | public async static Task Send_PlayingCategory(IDialogContext context, ...
method Send_SwitchedCategory (line 347) | public async static Task Send_SwitchedCategory(IDialogContext context,...
method Send_LightningModeStart (line 362) | public async static Task Send_LightningModeStart(IDialogContext contex...
method Send_LightningModeEnd (line 422) | public async static Task Send_LightningModeEnd(IDialogContext context,...
method CreateResponse (line 454) | private static IMessageActivity CreateResponse
method GetInnerSsmlContents (line 523) | public static string GetInnerSsmlContents(string ssml)
method CombineAudioAndTextForSSML (line 537) | public static string CombineAudioAndTextForSSML(Uri audioStream, strin...
method SelectRandomString (line 554) | private static string SelectRandomString(IList<string> options)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/SsmlWrapper.cs
class SsmlWrapper (line 10) | public static class SsmlWrapper
type Gender (line 29) | public enum Gender
method IsInSSMLFormat (line 47) | public static bool IsInSSMLFormat(string text)
method Wrap (line 59) | public static string Wrap(string text, string locale = "en-US", Gender...
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/TriviaResponse.cs
class TriviaQuestion (line 8) | public class TriviaQuestion
method Decode (line 28) | public void Decode()
class TriviaResponse (line 42) | public class TriviaResponse
method Decode (line 44) | public void Decode()
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Runtime/Utility.cs
class Utility (line 7) | public static class Utility
method IfIs (line 15) | public static void IfIs<TDerived>(this object baseObject, Action<TDeri...
method IfIs (line 34) | public static TResult IfIs<TDerived, TResult>(
method ArgumentNotNull (line 52) | public static void ArgumentNotNull<TArg>(TArg arg, string name)
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Shared/AppEntities.cs
class AppEntities (line 7) | public class AppEntities
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/Shared/MessageType.cs
type MessageType (line 5) | public enum MessageType
FILE: blog-samples/CSharp/TriviaBotSpeechSample/TriviaBot/TriviaDialog.cs
class TriviaDialog (line 16) | [Serializable]
method ResetState (line 31) | private void ResetState()
method StartAsync (line 45) | public async Task StartAsync(IDialogContext context)
method MessageReceivedAsync (line 50) | public async Task MessageReceivedAsync(IDialogContext context, IAwaita...
method State_None (line 100) | private async Task State_None(IDialogContext context, IMessageActivity...
method State_Trivia (line 128) | private async Task State_Trivia(IDialogContext context, IMessageActivi...
method State_SwitchCategory (line 134) | private async Task State_SwitchCategory(IDialogContext context, IMessa...
method GetCategoryFromLuis (line 168) | private TriviaCategory GetCategoryFromLuis(LuisResult luis)
method SwitchCategory_ResolveCategory (line 190) | private TriviaCategory SwitchCategory_ResolveCategory(IDialogContext c...
method Trivia_ProcessAnswer (line 215) | private async Task Trivia_ProcessAnswer(IDialogContext context, IMessa...
method Trivia_NextQuestion (line 366) | private async Task Trivia_NextQuestion(IDialogContext context, IMessag...
method StartGame_Trivia (line 374) | private async Task StartGame_Trivia(IDialogContext context, IMessageAc...
method ProcessLuis_Play (line 391) | private async Task ProcessLuis_Play(IDialogContext context, IMessageAc...
method Trivia_AskQuestion (line 414) | private async Task Trivia_AskQuestion(IDialogContext context, IMessage...
method GetCategoryValue (line 451) | private TriviaCategory GetCategoryValue(string category)
method HttpGet (line 486) | private static string HttpGet(string URI)
method ResolveOrdinalReference (line 504) | private static int ResolveOrdinalReference(string message)
method ShuffleResults (line 526) | private List<string> ShuffleResults(IList<string> list)
FILE: blog-samples/Node/Blog-Redux-Bot/redux/conversationActions.js
constant RESET (line 1) | const RESET = 'RESET';
constant SET_CITY (line 2) | const SET_CITY = 'SET_CITY';
constant SET_USERNAME (line 3) | const SET_USERNAME = 'SET_USERNAME';
function reset (line 5) | function reset() {
function setCity (line 9) | function setCity(city) {
function setUsername (line 13) | function setUsername(username) {
FILE: blog-samples/Node/Blog-Redux-Bot/redux/dialogActions.js
constant PROMPT_TEXT (line 1) | const PROMPT_TEXT = 'DIALOG/PROMPT_TEXT';
constant RECEIVE_MESSAGE (line 2) | const RECEIVE_MESSAGE = 'DIALOG/RECEIVE_MESSAGE';
constant SEND_EVENT (line 3) | const SEND_EVENT = 'DIALOG/SEND_EVENT';
constant SEND_MESSAGE (line 4) | const SEND_MESSAGE = 'DIALOG/SEND_MESSAGE';
constant END_CONVERSATION (line 5) | const END_CONVERSATION = 'DIALOG/END_CONVERSATION';
function promptText (line 7) | function promptText(text) {
function receiveMessage (line 11) | function receiveMessage(text, attachments, result) {
function sendEvent (line 18) | function sendEvent(name, value) {
function sendMessage (line 25) | function sendMessage(text, attachments) {
function endConversation (line 32) | function endConversation(text, attachments, result){
FILE: blog-samples/Node/Blog-Redux-Bot/redux/reducer.js
constant DEFAULT_STATE (line 3) | const DEFAULT_STATE = {
function conversationReducer (line 8) | function conversationReducer(state = DEFAULT_STATE, action) {
FILE: docs-samples/CSharp/Simple-LUIS-Notes-Sample/Simple-LUIS-Notes-Sample/App_Start/WebApiConfig.cs
class WebApiConfig (line 7) | public static class WebApiConfig
method Register (line 9) | public static void Register(HttpConfiguration config)
FILE: docs-samples/CSharp/Simple-LUIS-Notes-Sample/Simple-LUIS-Notes-Sample/Controllers/MessagesController.cs
class MessagesController (line 11) | [BotAuthentication]
method Post (line 18) | public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
method HandleSystemMessage (line 32) | private Activity HandleSystemMessage(Activity message)
FILE: docs-samples/CSharp/Simple-LUIS-Notes-Sample/Simple-LUIS-Notes-Sample/Dialogs/SimpleNoteDialog.cs
class SimpleNoteDialog (line 11) | [LuisModel("7d8ea658-f01a-49f2-a239-2d7ef805dde9", "1cf447f840ee414e87c7...
method TryFindNote (line 29) | public bool TryFindNote(LuisResult result, out Note note)
method TryFindNote (line 54) | public bool TryFindNote(string noteTitle, out Note note)
method None (line 66) | [LuisIntent("")]
method DeleteNote (line 80) | [LuisIntent("Note.Delete")]
method After_DeleteTitlePrompt (line 97) | private async Task After_DeleteTitlePrompt(IDialogContext context, IAw...
method FindNote (line 124) | [LuisIntent("Note.ReadAloud")]
method CreateNote (line 156) | [LuisIntent("Note.Create")]
method After_TitlePrompt (line 177) | private async Task After_TitlePrompt(IDialogContext context, IAwaitabl...
method After_TextPrompt (line 202) | private async Task After_TextPrompt(IDialogContext context, IAwaitable...
method SimpleNoteDialog (line 213) | public SimpleNoteDialog()
method SimpleNoteDialog (line 218) | public SimpleNoteDialog(ILuisService service)
class Note (line 223) | [Serializable]
method ToString (line 230) | public override string ToString()
method Equals (line 235) | public bool Equals(Note other)
method Equals (line 242) | public override bool Equals(object other)
method GetHashCode (line 247) | public override int GetHashCode()
FILE: docs-samples/CSharp/Simple-LUIS-Notes-Sample/Simple-LUIS-Notes-Sample/Global.asax.cs
class WebApiApplication (line 10) | public class WebApiApplication : System.Web.HttpApplication
method Application_Start (line 12) | protected void Application_Start()
FILE: docs-samples/Node/basics-naturalLanguage/basicNote-intentDialog.js
function noteCount (line 187) | function noteCount(notes) {
FILE: docs-samples/Node/basics-naturalLanguage/basicNote.js
function noteCount (line 179) | function noteCount(notes) {
FILE: docs-samples/V4/JS/contosocafebot-luis-dialogs/lib/CafeLUISModel.d.ts
type _Intents (line 10) | interface _Intents {
type _Instance (line 16) | interface _Instance {
type _Entities (line 22) | interface _Entities {
type CafeLUISModel (line 29) | interface CafeLUISModel {
FILE: docs-samples/V4/JS/contosocafebot-luis-dialogs/lib/luisbot.js
function fulfilled (line 4) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 5) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 6) | function step(result) { result.done ? resolve(result.value) : new P(func...
function SaveEntities (line 170) | function SaveEntities(dc, typedresult) {
FILE: docs-samples/V4/JS/contosocafebot-luis-dialogs/src/CafeLUISModel.ts
type _Intents (line 11) | interface _Intents {
type _Instance (line 18) | interface _Instance {
type _Entities (line 25) | interface _Entities {
type CafeLUISModel (line 38) | interface CafeLUISModel {
FILE: docs-samples/V4/JS/contosocafebot-luis-dialogs/src/luisbot.ts
type Intents (line 27) | enum Intents {
type CafeBotConvState (line 47) | interface CafeBotConvState {
function SaveEntities (line 189) | async function SaveEntities( dc: DialogContext<TurnContext>, typedresult) {
FILE: docs-samples/v3Node/startNewDialog/botadapter.js
function _clone (line 5) | function _clone(obj) {
function loadSession (line 17) | function loadSession(address, opts, cb) {
function beginDialog (line 88) | function beginDialog(address, dialogId, dialogArgs, opts, done) {
function patch (line 115) | function patch(bot) {
Condensed preview — 460 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,020K chars).
[
{
"path": ".gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".gitignore",
"chars": 4222,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "LICENSE",
"chars": 1183,
"preview": " MIT License\r\n\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n\r\n Permission is hereby granted, fr"
},
{
"path": "README.md",
"chars": 670,
"preview": "# Bot Framework Samples\r\nThis repo contains samples that are specifically used in the blog posts. You can find additiona"
},
{
"path": "SDKV4-Samples/.gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": "SDKV4-Samples/.gitignore",
"chars": 4195,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "SDKV4-Samples/LICENSE",
"chars": 1162,
"preview": " MIT License\n\n Copyright (c) Microsoft Corporation. All rights reserved.\n\n Permission is hereby granted, free o"
},
{
"path": "SDKV4-Samples/README.md",
"chars": 450,
"preview": "# Bot Framework Samples\n\nThis branch is for Bot Builder SDK V4 samples used in the documentation. \n\n## Contributing\n\nThi"
},
{
"path": "SDKV4-Samples/_config.yml",
"chars": 26,
"preview": "theme: jekyll-theme-cayman"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/BotBuilder.ruleset",
"chars": 1337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Microsoft Managed Recommended Rules\" Description=\"These rules foc"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.cs",
"chars": 18747,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.csproj",
"chars": 973,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.0</TargetFramework>\n <Code"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBotAccessors.cs",
"chars": 2507,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Mi"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/DeploymentScripts/MsbotClone/bot.recipe",
"chars": 788,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"24\",\n "
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/Program.cs",
"chars": 1317,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing Microsoft.AspNet"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/Properties/launchSettings.json",
"chars": 635,
"preview": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n "
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/README.md",
"chars": 1814,
"preview": "This sample creates a complex conversation with dialogs and ASP.Net Core 2.\n\n# To try this sample\n- Clone the samples re"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/Startup.cs",
"chars": 5473,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/UserProfile.cs",
"chars": 819,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/appsettings.json",
"chars": 66,
"preview": "{\n \"botFilePath\": \"complex-dialog.bot\",\n \"botFileSecret\": \"\"\n}\n"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/complex-dialog.bot",
"chars": 330,
"preview": "{\n \"name\": \"complex-dialog-bot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"dev"
},
{
"path": "SDKV4-Samples/dotnet_core/ComplexDialogBot/wwwroot/default.htm",
"chars": 19502,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-wid"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/BotBuilder.ruleset",
"chars": 1337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Microsoft Managed Recommended Rules\" Description=\"These rules foc"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DeploymentScripts/MsbotClone/bot.recipe",
"chars": 788,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"24\",\n "
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.cs",
"chars": 27392,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.csproj",
"chars": 1036,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.0</TargetFramework>\n <Code"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBotAccessors.cs",
"chars": 2543,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Program.cs",
"chars": 1317,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing Microsoft.AspNet"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Properties/launchSettings.json",
"chars": 637,
"preview": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n "
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/README.md",
"chars": 1875,
"preview": "This sample creates a dialog-based conversation that can be interrupted in various ways in ASP.Net Core 2.\n\n# To try thi"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Startup.cs",
"chars": 5497,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/UserProfile.cs",
"chars": 819,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Bo"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/appsettings.json",
"chars": 76,
"preview": "{\n \"botFilePath\": \"dialog-interruptions.bot\",\n \"botFileSecret\": \"\"\n}\n"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/dialog-interruptions.bot",
"chars": 336,
"preview": "{\n \"name\": \"dialog-interruptions-bot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\""
},
{
"path": "SDKV4-Samples/dotnet_core/DialogInterruptionsBot/wwwroot/default.htm",
"chars": 19524,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-wid"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DeploymentScripts/MsbotClone/bot.recipe",
"chars": 642,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.cs",
"chars": 17454,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.csproj",
"chars": 1434,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.0</TargetFramework>\n <CodeA"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.ruleset",
"chars": 1337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Microsoft Managed Recommended Rules\" Description=\"These rules foc"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.xml",
"chars": 10839,
"preview": "<?xml version=\"1.0\"?>\n<doc>\n <assembly>\n <name>DialogPromptBot</name>\n </assembly>\n <members>\n <m"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBotAccessors.cs",
"chars": 2107,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Mi"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/Program.cs",
"chars": 1318,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing Microsoft.AspNet"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/Properties/launchSettings.json",
"chars": 620,
"preview": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n "
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/README.md",
"chars": 1948,
"preview": "# Dialog Prompt Bot\n \nThis sample demonstrates how to use dialog prompts in your ASP.Net Core 2 bot to gather and valida"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/Startup.cs",
"chars": 5611,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/appsettings.json",
"chars": 63,
"preview": "{\n \"botFilePath\": \"dialog-prompt.bot\",\n \"botFileSecret\": \"\"\n}"
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/dialog-prompt.bot",
"chars": 268,
"preview": "{\n \"name\": \"PromptsBot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"development\",\n \"endpoint\""
},
{
"path": "SDKV4-Samples/dotnet_core/DialogPromptBot/wwwroot/default.htm",
"chars": 19045,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-wid"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/ConversationFlow.cs",
"chars": 463,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace Microsoft.B"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBot.cs",
"chars": 13388,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBot.ruleset",
"chars": 1337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Microsoft Managed Recommended Rules\" Description=\"These rules foc"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBotAccessors.cs",
"chars": 3181,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Mi"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/DeploymentScripts/MsbotClone/bot.recipe",
"chars": 642,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/Program.cs",
"chars": 1318,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing Microsoft.AspNet"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/PromptUsersForInput.csproj",
"chars": 1319,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.0</TargetFramework>\n <Code"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/Properties/launchSettings.json",
"chars": 634,
"preview": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n "
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/README.md",
"chars": 2527,
"preview": "# Prompt users for input\n\nThis sample demonstrates how to create your own prompts with an ASP.Net Core 2 bot.\nThe bot m"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/Startup.cs",
"chars": 5472,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/UserProfile.cs",
"chars": 304,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace Microsoft.B"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/appsettings.json",
"chars": 63,
"preview": "{\n \"botFilePath\": \"custom-prompt.bot\",\n \"botFileSecret\": \"\"\n}"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/custom-prompt.bot",
"chars": 273,
"preview": "{\n \"name\": \"CustomPromptBot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"development\",\n \"endp"
},
{
"path": "SDKV4-Samples/dotnet_core/PromptUsersForInput/wwwroot/default.htm",
"chars": 19045,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-wid"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/ConversationData.cs",
"chars": 576,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace Microsoft.B"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/DeploymentScripts/MsbotClone/bot.recipe",
"chars": 621,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/Program.cs",
"chars": 1318,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing Microsoft.AspNet"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/Properties/launchSettings.json",
"chars": 618,
"preview": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n "
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/README.md",
"chars": 1611,
"preview": "# Save user and conversation data\n\nThis sample demonstrates how to save user and conversation data in an ASP.Net Core 2"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/Startup.cs",
"chars": 5423,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBot.cs",
"chars": 5138,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBot.csproj",
"chars": 1340,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.0</TargetFramework>\n <Code"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBot.ruleset",
"chars": 1337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Microsoft Managed Recommended Rules\" Description=\"These rules foc"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBot.sln",
"chars": 1087,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.27428.2043\nM"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBot.xml",
"chars": 6539,
"preview": "<?xml version=\"1.0\"?>\n<doc>\n <assembly>\n <name>StateBot</name>\n </assembly>\n <members>\n <member n"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/StateBotAccessors.cs",
"chars": 3141,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Mi"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/UserProfile.cs",
"chars": 394,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nusing System;\nusing Sy"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/appsettings.json",
"chars": 55,
"preview": "{\n \"botFilePath\": \"state.bot\",\n \"botFileSecret\": \"\"\n}"
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/state.bot",
"chars": 266,
"preview": "{\n \"name\": \"StateBot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"development\",\n \"endpoint\": "
},
{
"path": "SDKV4-Samples/dotnet_core/StateBot/wwwroot/default.htm",
"chars": 19029,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-wid"
},
{
"path": "SDKV4-Samples/dotnet_core/nlp-with-dispatch/QnAMaker.tsv",
"chars": 1176,
"preview": "Question\tAnswer\tSource\tMetadata\r\nhi\tHello!\tQnAMaker.tsv\t\r\ngreetings\tHello!\tQnAMaker.tsv\t\r\ngood morning\tHello!\tQnAMaker.t"
},
{
"path": "SDKV4-Samples/dotnet_core/nlp-with-dispatch/home-automation.json",
"chars": 11724,
"preview": "{\n \"name\": \"Home Automation\",\n \"versionId\": \"0.1\",\n \"desc\": \"Home Automation LUIS application - Bot Builder Samples\","
},
{
"path": "SDKV4-Samples/dotnet_core/nlp-with-dispatch/nlp-with-dispatchDispatch.json",
"chars": 8780,
"preview": "{\n \"name\": \"nlp-with-dispatchDispatch\",\n \"versionId\": \"Dispatch\",\n \"desc\": \"Dispatch model for nlp-with-dispatchDispa"
},
{
"path": "SDKV4-Samples/dotnet_core/nlp-with-dispatch/weather.json",
"chars": 6870,
"preview": "{\n \"name\": \"Weather\",\n \"versionId\": \"0.1\",\n \"desc\": \"Weather LUIS application - Bot Builder Samples\",\n \"culture\": \"e"
},
{
"path": "SDKV4-Samples/dotnet_core/nlp-with-luis/reminders-with-entities.json",
"chars": 6309,
"preview": "{\r\n \"intents\": [\r\n {\r\n \"name\": \"Calendar_Add\"\r\n },\r\n {\r\n \"name\": \"Calendar_Find\"\r\n },\r\n {\r\n "
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/.eslintrc.js",
"chars": 312,
"preview": "module.exports = {\n \"extends\": \"standard\",\n \"rules\": {\n \"semi\": [2, \"always\"],\n \"indent\": [2, 4],\n \"no-return"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/.gitignore",
"chars": 17,
"preview": "node_modules\n.env"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/README.md",
"chars": 4029,
"preview": "# Dialog Prompt Bot\nBot from the prompt-users-using-dialogs topic\n\nThis bot has been created using [Microsoft Bot Framew"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/bot.js",
"chars": 8641,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst { ActivityTypes }"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/deploymentScripts/msbotClone/bot.recipe",
"chars": 641,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/dialog-prompt.bot",
"chars": 326,
"preview": "{\n \"name\": \"DialogPromptBot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"develo"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/index.js",
"chars": 4479,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst path = require('p"
},
{
"path": "SDKV4-Samples/js/DialogPromptBot/package.json",
"chars": 1035,
"preview": "{\n \"name\": \"dialog-prompt-bot\",\n \"version\": \"1.0.0\",\n \"description\": \"Bot from the prompt-users-using-dialogs t"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/.eslintrc.js",
"chars": 312,
"preview": "module.exports = {\n \"extends\": \"standard\",\n \"rules\": {\n \"semi\": [2, \"always\"],\n \"indent\": [2, 4],\n \"no-return"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/README.md",
"chars": 2573,
"preview": "# Prompt users for input\n\nThis sample demonstrates how to create your own prompts with an ASP.Net Core 2 bot.\nThe bot ma"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/bot.js",
"chars": 9630,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst Recognizers = req"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/deploymentScripts/msbotClone/bot.recipe",
"chars": 635,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/index.js",
"chars": 3630,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst path = require('p"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/package.json",
"chars": 1061,
"preview": "{\n \"name\": \"simplePrompts\",\n \"version\": \"1.0.0\",\n \"description\": \"Sample code for Create your own prompts to ga"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/resources/echo.chat",
"chars": 94,
"preview": "user=Vishwac\nbot=EchoBot\n\nuser: Hi\nbot: 1: You said \"Hi\"\nuser: Hello\nbot: 2: You said \"Hello\"\n"
},
{
"path": "SDKV4-Samples/js/PromptUsersForInput/simplePrompts.bot",
"chars": 324,
"preview": "{\n \"name\": \"simplePrompts\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"developm"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/.eslintrc.js",
"chars": 312,
"preview": "module.exports = {\n \"extends\": \"standard\",\n \"rules\": {\n \"semi\": [2, \"always\"],\n \"indent\": [2, 4],\n \"no-return"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/.gitignore",
"chars": 17,
"preview": "node_modules\n.env"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/ComplexDialogBot.bot",
"chars": 2039,
"preview": "{\n \"name\": \"ComplexDialogBot\",\n \"description\": \"\",\n \"services\": [\n {\n \"type\": \"abs\",\n "
},
{
"path": "SDKV4-Samples/js/complexDialogBot/README.md",
"chars": 1624,
"preview": "# ComplexDialogBot\n\nThis sample creates a complex conversation with dialogs and Node.js.\n\nThis bot has been created usin"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/bot.js",
"chars": 9195,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst { ActivityTypes }"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/deploymentScripts/msbotClone/bot.recipe",
"chars": 644,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/js/complexDialogBot/iisnode.yml",
"chars": 70,
"preview": "nodeProcessCommandLine: \"D:\\Program Files (x86)\\nodejs\\8.9.4\\node.exe\""
},
{
"path": "SDKV4-Samples/js/complexDialogBot/index.js",
"chars": 3747,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst path = require('p"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/package.json",
"chars": 1074,
"preview": "{\n \"name\": \"ComplexDialogBot\",\n \"version\": \"1.0.0\",\n \"description\": \"Sample code for the how to topic for creat"
},
{
"path": "SDKV4-Samples/js/complexDialogBot/web.config",
"chars": 2505,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n This configuration file is required if iisnode is used to run node proc"
},
{
"path": "SDKV4-Samples/js/nlp-with-dispatch/QnAMaker.tsv",
"chars": 1176,
"preview": "Question\tAnswer\tSource\tMetadata\r\nhi\tHello!\tQnAMaker.tsv\t\r\ngreetings\tHello!\tQnAMaker.tsv\t\r\ngood morning\tHello!\tQnAMaker.t"
},
{
"path": "SDKV4-Samples/js/nlp-with-dispatch/home-automation.json",
"chars": 11724,
"preview": "{\n \"name\": \"Home Automation\",\n \"versionId\": \"0.1\",\n \"desc\": \"Home Automation LUIS application - Bot Builder Samples\","
},
{
"path": "SDKV4-Samples/js/nlp-with-dispatch/nlp-with-dispatchDispatch.json",
"chars": 8780,
"preview": "{\n \"name\": \"nlp-with-dispatchDispatch\",\n \"versionId\": \"Dispatch\",\n \"desc\": \"Dispatch model for nlp-with-dispatchDispa"
},
{
"path": "SDKV4-Samples/js/nlp-with-dispatch/weather.json",
"chars": 6870,
"preview": "{\n \"name\": \"Weather\",\n \"versionId\": \"0.1\",\n \"desc\": \"Weather LUIS application - Bot Builder Samples\",\n \"culture\": \"e"
},
{
"path": "SDKV4-Samples/js/nlp-with-luis/reminders-with-entities.json",
"chars": 6309,
"preview": "{\r\n \"intents\": [\r\n {\r\n \"name\": \"Calendar_Add\"\r\n },\r\n {\r\n \"name\": \"Calendar_Find\"\r\n },\r\n {\r\n "
},
{
"path": "SDKV4-Samples/js/stateBot/.eslintrc.js",
"chars": 312,
"preview": "module.exports = {\n \"extends\": \"standard\",\n \"rules\": {\n \"semi\": [2, \"always\"],\n \"indent\": [2, 4],\n \"no-return"
},
{
"path": "SDKV4-Samples/js/stateBot/.gitignore",
"chars": 17,
"preview": "node_modules\n.env"
},
{
"path": "SDKV4-Samples/js/stateBot/README.md",
"chars": 1686,
"preview": "# Save user and conversation data\n\nThis sample demonstrates how to save user and conversation data in a Node.js bot.\nThe"
},
{
"path": "SDKV4-Samples/js/stateBot/bot.js",
"chars": 3469,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst { ActivityTypes }"
},
{
"path": "SDKV4-Samples/js/stateBot/deploymentScripts/msbotClone/bot.recipe",
"chars": 620,
"preview": "{\n \"version\": \"1.0\",\n \"resources\": [\n {\n \"type\": \"endpoint\",\n \"id\": \"1\",\n \"name\": \"development\",\n "
},
{
"path": "SDKV4-Samples/js/stateBot/index.js",
"chars": 3731,
"preview": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nconst path = require('p"
},
{
"path": "SDKV4-Samples/js/stateBot/package.json",
"chars": 996,
"preview": "{\n \"name\": \"stateBot\",\n \"version\": \"1.0.0\",\n \"description\": \"Demonstrates how to set up user and conversation s"
},
{
"path": "SDKV4-Samples/js/stateBot/resources/echo.chat",
"chars": 94,
"preview": "user=Vishwac\nbot=EchoBot\n\nuser: Hi\nbot: 1: You said \"Hi\"\nuser: Hello\nbot: 2: You said \"Hello\"\n"
},
{
"path": "SDKV4-Samples/js/stateBot/stateBot.bot",
"chars": 319,
"preview": "{\n \"name\": \"stateBot\",\n \"services\": [\n {\n \"type\": \"endpoint\",\n \"name\": \"development\","
},
{
"path": "SECURITY.md",
"chars": 2757,
"preview": "<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products an"
},
{
"path": "StackOverflow-Bot/.gitignore",
"chars": 4951,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# Azur"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/AnalyzeDialog.cs",
"chars": 5280,
"preview": "using System;\nusing System.Configuration;\nusing System.IO;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Htt"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Clients/DialogAnalyzerClient.cs",
"chars": 4978,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nusing DialogAnalyzerF"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Clients/DialogDataInterpreter.cs",
"chars": 6448,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nusing DialogA"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/DialogAnalyzerFunc.csproj",
"chars": 838,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <TargetFramework>net461</TargetFramework>\n </PropertyGroup>\n "
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Extensions/EnumerableExtensions.cs",
"chars": 894,
"preview": "using System;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DialogAnalyzerFunc.Extensio"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Extensions/HttpExtensions.cs",
"chars": 1653,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Linq;\nusing System.Text;\n\nusing New"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Models/ComputerVisionImageAnalysisResult.cs",
"chars": 1655,
"preview": "using System;\nusing System.Runtime.Serialization;\n\nnamespace DialogAnalyzerFunc.Models\n{\n [DataContract]\n public "
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Models/DialogAnalysisResult.cs",
"chars": 1697,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\n\nnamespace Dialo"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Models/HandwritingRecognitionResult.cs",
"chars": 2064,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\n\nusing DialogAna"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Models/ImageTextRegion.cs",
"chars": 1361,
"preview": "using System;\nusing System.Runtime.Serialization;\n\nnamespace DialogAnalyzerFunc.Models\n{\n [DataContract]\n public "
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Models/TextAnalyticsResult.cs",
"chars": 489,
"preview": "using System;\nusing System.Runtime.Serialization;\n\nnamespace DialogAnalyzerFunc.Models\n{\n [DataContract]\n public "
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Services/ComputerVisionService.cs",
"chars": 6191,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net.Http;\nusing System.Linq;\nusing System"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Services/TextAnalyticsService.cs",
"chars": 2241,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nusing DialogAnalyzerFunc.Models;\nusing D"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Utilities/HttpClientUtility.cs",
"chars": 6153,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/Utilities/StringUtility.cs",
"chars": 698,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace DialogAnalyzerFunc.Utilities\n{\n public"
},
{
"path": "StackOverflow-Bot/DialogAnalyzerFunc/host.json",
"chars": 3,
"preview": "{\n}"
},
{
"path": "StackOverflow-Bot/LICENSE",
"chars": 1087,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2017 Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any pe"
},
{
"path": "StackOverflow-Bot/README.md",
"chars": 16411,
"preview": "# Stack Overflow Bot\n\nThis Bot is intended to demonstrate a number of integrations between Microsoft Bot Framework, and "
},
{
"path": "StackOverflow-Bot/StackBot/Dockerfile",
"chars": 76,
"preview": "FROM node:8-onbuild\nEXPOSE 3978\nRUN npm install\nCMD [\"npm\", \"run\", \"start\"]\n"
},
{
"path": "StackOverflow-Bot/StackBot/StackBot.njsproj",
"chars": 4803,
"preview": "<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" ToolsVersion=\"4.0\">\n <Prop"
},
{
"path": "StackOverflow-Bot/StackBot/data/jokes.json",
"chars": 2222,
"preview": "{\n \"items\": [\n {\n \"body_markdown\": \"Not a joke, but a cartoon:\\r\\n\\r\\n![enter image description her"
},
{
"path": "StackOverflow-Bot/StackBot/data/luis.json",
"chars": 155824,
"preview": "{\n \"luis_schema_version\": \"2.1.0\",\n \"versionId\": \"0.1\",\n \"name\": \"Stackoverflow\",\n \"desc\": \"\",\n \"culture\": \"en-us\","
},
{
"path": "StackOverflow-Bot/StackBot/data/smalltalk.tsv",
"chars": 94141,
"preview": "Question\tAnswer\tSource\nwho are you?\tsmalltalk.agent.acquaintance\tsmalltalkkb.tsv\nall about you\tsmalltalk.agent.acquaint"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/brain.js",
"chars": 402,
"preview": "module.exports = () => {\n bot.dialog('sobot:brain', [\n async (session) => {\n session.send(\"Here are"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/joke.js",
"chars": 873,
"preview": "module.exports = () => {\n // Tells the user a fun joke.\n bot.dialog('sobot:joke', [\n (session) => {\n "
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/keywordPrompt.js",
"chars": 539,
"preview": "module.exports = () => {\n // Ask the user what they'd like to look for.\n bot.dialog('sobot:keywordPrompt', [\n "
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/languages.js",
"chars": 299,
"preview": "module.exports = () => {\n // This bot can speak *all* languages!\n bot.dialog('sobot:languages', [\n async (s"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/menu.js",
"chars": 315,
"preview": "module.exports = () => {\n // Shows off a menu with all the capabilities.\n bot.dialog('sobot:menu', [\n async"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/screenshot.js",
"chars": 5609,
"preview": "module.exports = () => {\n // See if we can read a screenshot, and try to search the internet for help.\n bot.dialog"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/search.js",
"chars": 402,
"preview": "module.exports = () => {\n // Perform a search and respond with results.\n bot.dialog('sobot:search', [\n asyn"
},
{
"path": "StackOverflow-Bot/StackBot/dialogs/smalltalk.js",
"chars": 2213,
"preview": "module.exports = () => {\n // Smalltalk… gibberish, babble, etc. Not the programming language :)\n bot.dialog('sobot"
},
{
"path": "StackOverflow-Bot/StackBot/index.js",
"chars": 6713,
"preview": "global.restify = require('restify');\nglobal.builder = require('botbuilder');\nglobal.lodash = require('lodash');\nglobal.p"
},
{
"path": "StackOverflow-Bot/StackBot/lib/attachments.js",
"chars": 7924,
"preview": "const builder = require('botbuilder');\nconst cognitiveServices = require('./cognitiveservices');\n\nconst buildResultsMess"
},
{
"path": "StackOverflow-Bot/StackBot/lib/bingsearchclient.js",
"chars": 1555,
"preview": "const rp = require('request-promise');\n\nfunction BingSearchClient (opts) {\n if (!opts.bingSearchConfig) throw new Err"
},
{
"path": "StackOverflow-Bot/StackBot/lib/cognitiveservices.js",
"chars": 1060,
"preview": "var services = [{\n title: \"Text Analytics API\",\n description: \"A cloud-based service that provides advanced NLP ov"
},
{
"path": "StackOverflow-Bot/StackBot/lib/dialoganalyzerclient.js",
"chars": 1267,
"preview": "const request = require('request-promise');\nconst duplex = require('stream').Duplex;\n\nfunction DialogAnalyzerClient (opt"
},
{
"path": "StackOverflow-Bot/StackBot/lib/qnaclient.js",
"chars": 1642,
"preview": "const rp = require('request-promise');\nconst smallTalkReplies = require('./smalltalk');\nconst QNA_MAKER_URL = `${process"
},
{
"path": "StackOverflow-Bot/StackBot/lib/sentimentanalyzerclient.js",
"chars": 1041,
"preview": "const request = require('request-promise');\n\nfunction SentimentAnalyzerClient (opts) {\n if (!opts.key) throw new Erro"
},
{
"path": "StackOverflow-Bot/StackBot/lib/smalltalk.js",
"chars": 14401,
"preview": "var responses = { // shift alt f\n \"smalltalk.agent.acquaintance\": [\n \"I am a chatbot and I love to help.\"\n "
},
{
"path": "StackOverflow-Bot/StackBot/package.json",
"chars": 501,
"preview": "{\n \"name\": \"stackbot\",\n \"version\": \"1.0.0\",\n \"description\": \"A bot that helps you code. Built with Bot Framework and "
},
{
"path": "StackOverflow-Bot/StackBot/static/index.html",
"chars": 1054,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <link href=\"https://unpkg.com/botframework-webchat/botc"
},
{
"path": "StackOverflow-Bot/StackCode/out/src/bot/bot.html",
"chars": 3195,
"preview": "<!doctype html>\n<html>\n<meta charset=\"utf-8\" />\n<head>\n <script src=\"https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3."
},
{
"path": "StackOverflow-Bot/StackCode/out/src/extension.js",
"chars": 2990,
"preview": "'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst vscode = require(\"vscode\");\nconst opn"
},
{
"path": "StackOverflow-Bot/StackCode/out/test/extension.test.js",
"chars": 635,
"preview": "\"use strict\";\n//\n// Note: This example test is leveraging the Mocha test framework.\n// Please refer to their documentati"
},
{
"path": "StackOverflow-Bot/StackCode/out/test/index.js",
"chars": 977,
"preview": "//\n// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING\n//\n// This file is providing the test runner to u"
},
{
"path": "StackOverflow-Bot/StackCode/package.json",
"chars": 1564,
"preview": "{\n \"name\": \"StackCode\",\n \"displayName\": \"StackCode\",\n \"description\": \"A Stack Overflow Bot Companion for Visual"
},
{
"path": "StackOverflow-Bot/StackCode/src/bot/bot.html",
"chars": 3195,
"preview": "<!doctype html>\n<html>\n<meta charset=\"utf-8\" />\n<head>\n <script src=\"https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3."
},
{
"path": "StackOverflow-Bot/StackCode/src/extension.ts",
"chars": 2982,
"preview": "'use strict';\n\nimport * as vscode from 'vscode';\nimport * as opn from 'opn';\nimport * as fs from 'fs';\nimport * as path "
},
{
"path": "StackOverflow-Bot/StackCode/tsconfig.json",
"chars": 281,
"preview": "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es6\",\n \"outDir\": \"out\",\n \"lib\""
},
{
"path": "StackOverflow-Bot/StackOverflowBot.sln",
"chars": 1597,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26730.15\nMin"
},
{
"path": "StackOverflow-Bot/env.template",
"chars": 316,
"preview": "export BOTBUILDER_APP_ID=\nexport BOTBUILDER_APP_PASSWORD=\nexport KB_ID=\nexport QNA_KEY=\nexport QNA_URL=\nexport LUIS_MODE"
},
{
"path": "_config.yml",
"chars": 26,
"preview": "theme: jekyll-theme-cayman"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/App_Start/WebApiConfig.cs",
"chars": 1343,
"preview": "using Newtonsoft.Json;\nusing Newtonsoft.Json.Serialization;\nusing System;\nusing System.Collections.Generic;\nusing Syste"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Controllers/MessagesController.cs",
"chars": 2665,
"preview": "using System.Net;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Web.Http;\nusing Microsoft.Bot.Build"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Dialogs/RootDialog.cs",
"chars": 2402,
"preview": "using System;\nusing System.Threading.Tasks;\nusing Microsoft.Bot.Builder.Dialogs;\nusing Microsoft.Bot.Connector;\nusing M"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Global.asax",
"chars": 121,
"preview": "<%@ Application Codebehind=\"Global.asax.cs\" Inherits=\"Microsoft.Bot.Sample.AzureSql.WebApiApplication\" Language=\"C#\" %>"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Global.asax.cs",
"chars": 968,
"preview": "using Autofac;\nusing Microsoft.Bot.Builder.Dialogs;\nusing Microsoft.Bot.Builder.Dialogs.Internals;\nusing Microsoft.Bot."
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Microsoft.Bot.Sample.AzureSql.csproj",
"chars": 10604,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.Designer.cs",
"chars": 838,
"preview": "// <auto-generated />\nnamespace Microsoft.Bot.Sample.AzureSql.Migrations\n{\n using System.CodeDom.Compiler;\n using "
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.cs",
"chars": 1744,
"preview": "namespace Microsoft.Bot.Sample.AzureSql.Migrations\n{\n using System;\n using System.Data.Entity.Migrations;\n \n "
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.resx",
"chars": 7734,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/Configuration.cs",
"chars": 1087,
"preview": "namespace Microsoft.Bot.Sample.AzureSql.Migrations\n{\n using System;\n using System.Data.Entity;\n using System.Da"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Properties/AssemblyInfo.cs",
"chars": 1391,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataContext.cs",
"chars": 439,
"preview": "using System.Data.Entity;\n\n\nnamespace Microsoft.Bot.Sample.AzureSql.SqlStateService\n{\n public class SqlBotDataContex"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataEntity.cs",
"chars": 5235,
"preview": "using Microsoft.Bot.Builder.Dialogs;\nusing Microsoft.Bot.Builder.Dialogs.Internals;\nusing Newtonsoft.Json;\nusing Newton"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataStore.cs",
"chars": 4291,
"preview": "using Microsoft.Bot.Builder.Dialogs;\nusing Microsoft.Bot.Builder.Dialogs.Internals;\nusing Microsoft.Bot.Connector;\nusin"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Web.Debug.config",
"chars": 1270,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<!-- For more information on using web.config transformation visit http://go.mic"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Web.Release.config",
"chars": 1330,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<!-- For more information on using web.config transformation visit http://go.mic"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Web.config",
"chars": 4171,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n For more information on how to configure your ASP.NET application, please"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/default.htm",
"chars": 351,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title></title>\n <meta charset=\"utf-8\" />\n</head>\n<body style=\"font-family:'Segoe "
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/packages.config",
"chars": 1193,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n <package id=\"Autofac\" version=\"3.5.2\" targetFramework=\"net46\" />\n "
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql.sln",
"chars": 1030,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26430.6\nMini"
},
{
"path": "blog-samples/CSharp/AzureSql-StateClient/README.md",
"chars": 919,
"preview": "# Explanation\n\nA example State Client using Sql Server for storage.\n\n# Setup\n\n1) Register a bot with the Bot Framework a"
},
{
"path": "blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/App_Start/WebApiConfig.cs",
"chars": 1266,
"preview": "using System.Web.Http;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Serialization;\n\nnamespace Bot_Feedback_Sample\n{\n "
},
{
"path": "blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/ApplicationInsights.config",
"chars": 7467,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ApplicationInsights xmlns=\"http://schemas.microsoft.com/ApplicationInsights/2013"
}
]
// ... and 260 more files (download for full content)
About this extraction
This page contains the full source code of the Microsoft/BotFramework-Samples GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 460 files (1.8 MB), approximately 483.4k tokens, and a symbol index with 733 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.