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); } } }
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); } } }