/// <summary>
 /// Constructor.
 /// </summary>
 public RuntimeTrace()
 {
     // Note that a new RuntimeTrace object is created for each
     // consumer.  That means each caller has its own stream with
     // its own state.
     m_blockingStream = new MemoryQueueStream();
     m_listener       = new TextWriterTraceListener(m_blockingStream);
     Trace.Listeners.Add(m_listener);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public RuntimeTrace()
        {
            // Note that a new RuntimeTrace object is created for each
            // consumer.  That means each caller has its own stream with
            // its own state.
            m_blockingStream = new MemoryQueueStream();
            m_listener       = new TextWriterTraceListener(m_blockingStream);
            Trace.Listeners.Add(m_listener);

            TraceManager.TraceInformation("Creating RuntimeTrace service with listener ID: {0}, stream ID: {1}, numListeners: {2}",
                                          (m_listener != null) ? m_listener.GetHashCode().ToString() : "none",
                                          (m_blockingStream != null) ? m_blockingStream.GetHashCode().ToString() : "none",
                                          Trace.Listeners.Count);
        }