Пример #1
0
 void InvokeNewMessageRecieved(string Message)
 {
     ReceiveCloudToDeviceMessageAsync();
     if (NewMessageRecieved != null)
     {
         NewMessageRecieved.Invoke(this, Message);
     }
 }
Пример #2
0
        private bool ReadChatCommand(IrcLocalUser user, IrcMessageEventArgs eventArgs)
        {
            var line = eventArgs.Text;

            if (line.Length > 1)
            {
                var userMessage = new UserMessage(eventArgs.Source.Name, line);
                NewMessageRecieved?.Invoke(this, new NewMessageEventArgs(userMessage, user)
                {
                });
                return(true);
            }
            return(false);
        }
        private void SendTheMessageToRemoteHost(string host, string message)
        {
            var e = new NewMessageRecievedEventHandlerArgs(message);

            NewMessageRecieved?.Invoke(typeof(SpectraWayNLogTarget), e);
        }
Пример #4
0
 internal void RecieveNewMessage(Message message)
 {
     NewMessageRecieved?.Invoke(
         this,
         new RecievedMessageEventArgs(message, RemoteEndPoint));
 }