public static void Add(LoggerObject lo) { lock (Lock) { AllLoggers.Add(lo); if (!lo.Visible) { IncrementInvisibleCount(); } } }
// 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); }