This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.Bot.Builder; | |
| using Microsoft.Bot.Builder.Dialogs; | |
| using Microsoft.Bot.Schema; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.Bot.Builder; | |
| using Microsoft.Bot.Builder.Dialogs; | |
| using Microsoft.Bot.Schema; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http'); | |
| global.XMLHttpRequest = require('xhr2'); | |
| global.WebSocket = require('ws'); | |
| const hostname = '127.0.0.1'; | |
| const port = 3000; | |
| const server = http.createServer((req, res) => { | |
| res.statusCode = 200; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http'); | |
| global.XMLHttpRequest = require('xhr2'); | |
| global.WebSocket = require('ws'); | |
| const hostname = '127.0.0.1'; | |
| const port = 3000; | |
| const server = http.createServer((req, res) => { | |
| res.statusCode = 200; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "Succeeded", | |
| "recognitionResults": [ | |
| { | |
| "page": 1, | |
| "clockwiseOrientation": 0.32, | |
| "width": 8.5, | |
| "height": 11, | |
| "unit": "inch", | |
| "lines": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | |
| "type": "AdaptiveCard", | |
| "version": "1.0", | |
| "body": [ | |
| { | |
| "speak": "Tom's Pie is a pizza restaurant which is rated 9.3 by customers.", | |
| "type": "ColumnSet", | |
| "columns": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.Bot.Builder; | |
| using Microsoft.Bot.Builder.Dialogs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var choices = new[] { "Microsoft", "Google", "Facebook" }; | |
| var card1 = new HeroCard | |
| { | |
| Title = "Microsoft", | |
| Text = "A place you can add more text.", | |
| Images = new List<CardImage> { new CardImage("http://www.firstroboticscanada.org/new/wp-content/uploads/2016/12/Microsoft-Logo.jpg") }, | |
| Subtitle = "Subtitle information goes here.", | |
| Buttons = new List<CardAction>() { new CardAction(ActionTypes.ImBack, "Select", value: "Microsoft") }, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private async Task<DialogTurnResult> DisplayTokenPhase1Async(WaterfallStepContext stepContext, CancellationToken cancellationToken) | |
| { | |
| var json = await File.ReadAllTextAsync("./Cards/NextEpisodeCard.json"); | |
| var reply = stepContext.Context.Activity.CreateReply(); | |
| reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; | |
| foreach(var item in _favorites.Where(f => f.Show.NextEpisode?.FirstAired.ToLocalTime().Subtract(DateTime.Now).Days <= 14)) | |
| { | |
| var episodeJson = json.Replace("{{Show.Title}}", item.Show.Title) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] | |
| An unhandled exception has occurred while executing the request. | |
| System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. | |
| at Microsoft.Bot.Connector.Authentication.JwtTokenValidation.AuthenticateRequest(IActivity activity, String authHeader, ICredentialProvider credentials, IChannelProvider provider, HttpClient httpClient) in D:\a\1\s\libraries\Microsoft.Bot.Connector\Authentication\JwtTokenValidation.cs:line 50 | |
| at Microsoft.Bot.Builder.BotFrameworkAdapter.ProcessActivityAsync(String authHeader, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken) in D:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 203 | |
| at Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter.ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken) in D:\a\1\s\libraries\integration\Microsoft.Bot.Builder.Inte |