private void Reader() { while (true) { _getInput.WaitOne(); _input = _botInterface.ReadLine(); _gotInput.Set(); } }
public static Message Read(this IBotInterface bot) { if (bot == null) { throw new ArgumentNullException(nameof(bot)); } var data = bot.ReadLine(); return(JsonConvert.DeserializeObject <Message>(data)); }