예제 #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);
 }