Exemplo n.º 1
0
 public LogSource(LogPaneServices logPaneServices, LogSource parent = null)
 {
     this.logPaneServices = logPaneServices;
     fullName = null;
     Parent = parent;
     Children = new BindableCollection<LogSource>();
     isChecked = true;
 }
Exemplo n.º 2
0
        protected void Find(IReadOnlyList<string> loggerNames, LogSource parent, int index)
        {
            if (loggerNames.Count <= index)
            {
                return;
            }

            var name = loggerNames[index];
            var logSource = parent.Children.FirstOrDefault(s => s.Name == name);

            if (logSource == null)
            {
                logSource = new LogSource(logPaneServices, parent)
                {
                    Name = name,
                };

                parent.Children.Add(logSource);
            }

            Find(loggerNames, logSource, index + 1);
        }