示例#1
0
        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)
            {
            }
        }
示例#2
0
        private void Send(string message, string category)
        {
            var msg = new TraceMessage(m_serializer, message, category);

            m_queue.Send(msg, 1000);
        }