This file contains 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
[BotAuthentication] | |
public class MessagesController : ApiController | |
{ | |
public async Task<HttpResponseMessage> Post([FromBody]Activity activity) | |
{ | |
ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl)); | |
if (activity.Type == ActivityTypes.Message) | |
{ | |
// calculate something for us to return | |
int length = (activity.Text ?? string.Empty).Length; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
using Microsoft.Bot.Builder.Dialogs; | |
using Microsoft.Bot.Builder.FormFlow; | |
using Microsoft.Bot.Builder.Luis; | |
using Microsoft.Bot.Builder.Luis.Models; | |
using Microsoft.Bot.Builder.Resource; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
using Microsoft.Bot.Builder.Dialogs; | |
using Microsoft.Bot.Builder.FormFlow; | |
using Microsoft.Bot.Builder.Luis; | |
using Microsoft.Bot.Builder.Luis.Models; | |
using Microsoft.Bot.Builder.Resource; |
This file contains 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
<? xml version = "1.0" encoding = "utf-8" ?> | |
< !-- | |
For more information on how to configure your ASP.NET application, please visit | |
http://go.microsoft.com/fwlink/?LinkId=301879 | |
--> | |
< configuration > | |
< appSettings > | |
< !--update these with your appid and one of your appsecret keys--> | |
< add key = "MicrosoftAppId" value = "[GUID]" /> | |
< add key = "MicrosoftAppPassword" value = "[PASSWORD]" /> |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:MyApp" | |
x:Class="MyApp.MainPage"> | |
<ContentPage.Content> | |
<Grid> | |
<Image Source="background.png" Aspect="AspectFill"></Image> |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
namespace TravelAppMobile.Models | |
{ | |
public class MessageSet |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace TravelAppMobile.Models | |
{ | |
public class ConversationMessage |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using TravelAppMobile.Models; |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:viewModels="clr-namespace:TravelAppMobile.ViewModels;assembly=TravelAppMobile" | |
x:Class="TravelAppMobile.Pages.TravelAgentPage" | |
Title="Travel Agent"> | |
<ContentPage.BindingContext> | |
<viewModels:TravelAgentPageViewModel></viewModels:TravelAgentPageViewModel> | |
</ContentPage.BindingContext> | |
<ContentPage.Content> |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:viewModels="clr-namespace:ConversationApp.ViewModels;assembly=ConversationApp" | |
x:Class="ConversationApp.Pages.ConversationPage"> | |
<ContentPage.BindingContext> | |
<viewModels:ConversationPageViewModel></viewModels:ConversationPageViewModel> | |
</ContentPage.BindingContext> | |
<ContentPage.Content> | |
<StackLayout Orientation="Vertical" |
OlderNewer