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
public class BookParkingDialogChain : IDialog<object> | |
{ | |
private string selectedName, selectedEmail, selectedPhoneNumber; | |
private string selectedLicensePlate; | |
private ParkingAreaDetails selectedParkingLocationDetails; | |
private DateTime arrivalDateTime, departureDateTime; | |
private ParkingLotDetails selectedParkingLot; | |
ParkAroundBot.Data.ReserveTravelResponse result; | |
private bool finalConfirmation; |
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
public sealed class CustomTextInputDialog : IDialog<string> | |
{ | |
private CustomTextInputDialog() | |
{ } | |
public string InputPrompt { get; private set; } | |
public string WrongInputPrompt { get; private set; } | |
public ICustomInputValidator Validator { get; private set; } |
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
[Serializable] | |
public class DateTimeInputDialog : IDialog<DateTime> | |
{ | |
/// <summary> | |
/// If it is null, we're looking for DateTimeFrom | |
/// Else, we're looking for DateTimeTo | |
/// </summary> | |
private DateTime? inputDateTime; | |
private ParkingAreaDetails selectedParkingLocationDetails; |
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
[Serializable] | |
public class FullnameInputDialog : IDialog<string> | |
{ | |
public async Task StartAsync(IDialogContext context) | |
{ | |
var msg = context.MakeMessage(); | |
var attachments = new List<Attachment>(); | |
msg.AttachmentLayout = AttachmentLayoutTypes.List; | |
var actions = new List<CardAction>() |
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
private async Task ProcessFinished(IDialogContext ctx, IAwaitable<bool> confirmation) | |
{ | |
bool userConfirmed = await confirmation; | |
if (userConfirmed == false) | |
{ | |
ctx.Done("finished"); | |
return; | |
} | |
result = await |
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 Microsoft.Bot.Builder.Dialogs; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
namespace ParkAroundBot.CustomDialog | |
{ | |
public static class Extensions |
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
const request = require('request'); | |
const fs = require('fs'); | |
const url = 'https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment'; | |
const textanalyticskey = '<YOUR_TEXT_ANALYTICS_KEY>'; | |
const data = JSON.parse(fs.readFileSync('test.json', 'utf8')); | |
request.post(url, | |
{ |
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
[ | |
{ | |
"id": "1", | |
"text": "Δυσκολεύομαι να πιστέψω ότι υπάρχουν πράγματα που λειτουργούν τέλεια στην Ελλάδα. Ευχαριστώ και συγχαρητήρια για την προσπάθειά σας!" | |
}, | |
{ | |
"id": "2", | |
"text": "Όλα καλά. Ευχαριστώ πολύ!!" | |
}, | |
{ |
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
const restify = require('restify'); | |
const builder = require('botbuilder'); | |
const os = require('os'); | |
const server = restify.createServer(); | |
server.listen(process.env.port || process.env.PORT || 3978, function () { | |
console.log('%s listening to %s', server.name, server.url); | |
}); | |
var connector = new builder.ChatConnector({ |
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
FROM node:boron | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
COPY samplebot.js /usr/src/app | |
EXPOSE 3978 | |
CMD [ "node", "samplebot" ] |