示例#1
0
        public static void Add(LoggerObject lo)
        {
            lock (Lock)
            {
                AllLoggers.Add(lo);

                if (!lo.Visible)
                {
                    IncrementInvisibleCount();
                }
            }
        }
示例#2
0
        // Gets or makes the LoggerObject with the specified name.
        private LoggerObject GetLogger(string loggerName)
        {
            LoggerObject logger;

            if (!_foundLoggers.TryGetValue(loggerName, out logger))
            {
                if (!_oldLoggers.TryGetValue(loggerName, out logger))
                {
                    logger      = new LoggerObject();
                    logger.Name = loggerName;
                }

                _foundLoggers.Add(loggerName, logger);
                LoggerObjects.Add(logger);
            }

            return(logger);
        }