Esempio n. 1
0
        private void ProcessMessage(MessageInfo message)
        {
            if (message.Callback != null)
            {
                message.Callback(message.Message);
            }
            else
            {
                EventHandler <MessageQueueEventArgs> e = MessageReceived;
                if (e != null)
                {
                    e(this, new MessageQueueEventArgs(message.Message));
                }
            }

            if (message.Done != null)
            {
                lock (message.Done)
                {
                    Monitor.Pulse(message.Done);
                }
            }
        }
Esempio n. 2
0
        private void ProcessMessage(MessageInfo message)
        {
            if (message.Callback != null)
            {
                message.Callback(message.Message);
            }
            else
            {
                EventHandler<MessageQueueEventArgs> e = MessageReceived;
                if (e != null)
                {
                    e(this, new MessageQueueEventArgs(message.Message));
                }
            }

            if (message.Done != null)
            {
                lock (message.Done)
                {
                    Monitor.Pulse(message.Done);
                }
            }
        }