void m_queue_DataOnQueueChanged(object sender, EventArgs e) { var msg = new TraceMessage(m_serializer); try { Thread.Sleep(100); var result = m_queue.Receive(msg); if (result == ReadWriteResult.OK) { OnMessage.Fire(this, new GenericEventArgs <TraceMessage>(msg)); } } catch (Exception ex) { } }
private void Send(string message, string category) { var msg = new TraceMessage(m_serializer, message, category); m_queue.Send(msg, 1000); }