示例#1
0
        public void ParseLogger(String[] loggerParts, Int32 level)
        {
            if (level == LoggerLevel)
            {
                LoggerCount++;
                return;
            }
            //do I have a child logger for this name?
            String name = loggerParts.Take(level + 1).Aggregate((s1, s2) => s1 + "." + s2);
            var    cvm  = Childs.SingleOrDefault(vm => vm.LoggerPrefix.Equals(name));

            if (cvm == null)
            {
                cvm = new LoggerViewModel(name);
                Childs.Add(cvm);
            }
            cvm.ParseLogger(loggerParts, level + 1);
        }