public void BotResultToVLCCommand(IBotResult botResult) { string prefix = "vlc:"; string vlcRawText = String.Empty; if (botResult.Text.Length > prefix.Length && botResult.Text.StartsWith(prefix)) { vlcRawText = botResult.Text.Substring(prefix.Length); } else { return; } vlcRawText = vlcRawText.Trim(); VLCCommand vlcCommand; switch (vlcRawText) { case "step volume up": case "step volumeup": vlcCommand = new VLCCommand(VLCCommandType.StepVolumeUp); break; case "step volume down": case "step volumedown": vlcCommand = new VLCCommand(VLCCommandType.StepVolumeDown); break; case "launch and connect": case "launchandconnect": vlcCommand = new VLCCommand(VLCCommandType.LaunchAndConnect); break; case "fast forward": case "fastforward": vlcCommand = new VLCCommand(VLCCommandType.FastForward); break; case "previous": case "prev": vlcCommand = new VLCCommand(VLCCommandType.Previous); break; default: vlcCommand = new VLCCommand(vlcRawText); Console.WriteLine("Bot result as RawText"); break; } hub.Publish <VLCCommand>(vlcCommand); }
private void ProcessBotResult(IBotResult botResult) { Hub.Publish <IBotResult>(new BotResult("Dummy - Message reached ICANCOMPREHEND", botResult.UserResponse)); }
private void AddBotResult(IBotResult response) { helper.AddBotMessage(response.Text); }
private void ProcessBotResult(IBotResult botResult) { helper.PublishMessageToSubscribers(MessageType.BotResult, botResult.Text); }
static void PrintBotResult(IBotResult botResult) { Console.WriteLine("BotResult: " + botResult.Text); }