CGC_Codes

Chatbot/chat session interface

Jun 2nd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.CompilerServices;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace QXS.ChatBot
  9. {
  10.     public interface ChatSessionInterface
  11.     {
  12.         /// <summary>
  13.         /// The session received a messsage
  14.         /// </summary>
  15.         event Action<ChatSessionInterface, string> OnMessageReceived;
  16.  
  17.         /// <summary>
  18.         /// The session replied to a message
  19.         /// </summary>
  20.         event Action<ChatSessionInterface, string> OnMessageSent;
  21.  
  22.         string readMessage();
  23.         void sendMessage(string message);
  24.  
  25.         string askQuestion(string message);
  26.  
  27.         bool IsInteractive { get; set; }
  28.  
  29.         SessionStorage SessionStorage { get; set; }
  30.  
  31.  
  32.         void SetResponseHistorySize(int Size);
  33.         void AddResponseToHistory(BotResponse Response);
  34.         Stack<BotResponse> GetResponseHistory();
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment