示例#1
0
        private void Read()
        {
            while (true)
            {
                var answer = _reader.ReadLine();
                Console.WriteLine("Answer: " + answer);

                MessageRecivedEvent?.Invoke(this, new ChatMessageEventArgs(answer));
            }
        }
示例#2
0
 private void OnMessageRecived(MessageEventArgs e)
 {
     try
     {
         MessageRecivedEvent?.Invoke(this, e);
         CustomMessageRecivedEvent?.Invoke(e);
     }
     catch (Exception ex)
     {
         //log.Error(String.Format("PosID: {0}, {1}", e.UniqueID, ex));
     }
 }
示例#3
0
 protected virtual void OnMessageRecived(MessageEventArgs e)
 {
     MessageRecivedEvent?.Invoke(this, e);
 }