GSF.Diagnostics.LoggerInternal.LoggerInternal C# (CSharp) Method

LoggerInternal() public method

Creates a LoggerInternal.
public LoggerInternal ( LoggerInternal &loggerClass ) : System
loggerClass LoggerInternal
return System
        public LoggerInternal(out LoggerInternal loggerClass)
        {
            //Needed to set the member variable of Logger. 
            //This is because ScheduleTask will call Logger before Logger's static constructor is completed.
            loggerClass = this;

            m_syncRoot = new object();
            m_typeIndexCache = new Dictionary<Type, LogPublisherInternal>();
            m_allPublishers = new List<LogPublisherInternal>();
            m_subscribers = new List<WeakReference>();
            m_messages = new ConcurrentQueue<Tuple<LogMessage, LogPublisherInternal>>();

            // Since ScheduledTask calls ShutdownHandler, which calls Logger. This initialization method cannot occur
            // until after the Logger static class has finished initializing.
            m_calculateRoutingTable = new ScheduledTask();
            m_calculateRoutingTable.Running += CalculateRoutingTable;
            m_calculateRoutingTable.IgnoreShutdownEvent();
            m_routingTask = new ScheduledTask(ThreadingMode.DedicatedForeground);
            m_routingTask.Running += RoutingTask;
            m_routingTask.IgnoreShutdownEvent();
        }