If you add a new function / filter assure the following * Check that application is active: IsActive * Check that you got logs from selected loglevel: GetLogsByLevel() * Check if the namespace is active: IsNamespaceActive() * Check if the search criteria match: IsSearchCriteriaMatch()
Inheritance: INotifyPropertyChanged
Exemplo n.º 1
0
 public NamespaceViewModel(string name, ApplicationViewModel applicationViewModel)
 {
     IsChecked = true;
     IsExpanded = true;
     Name = name;
     Children = new ObservableCollection<NamespaceViewModel>();
     ApplicationViewModel = applicationViewModel;
 }
Exemplo n.º 2
0
 private void UpdateApplications(IEnumerable<LogViewModel> logsToInsert)
 {
     try {
         foreach (var log in logsToInsert) {
             var application = Applications.FirstOrDefault(m => m.Name == log.Application);
             if (application == null) {
                 application = new ApplicationViewModel(log.Application, Logs, Namespaces);
                 Applications.Add(application);
             }
         }
     } catch (Exception e) {
         Console.WriteLine("Could not update applications: " + e);
     }
 }
Exemplo n.º 3
0
 private void HandleNamespace(NamespaceViewModel parent, string suffix, ApplicationViewModel application, LogViewModel log)
 {
     // Example: VerbTeX.View (Verbosus was processed before)
     string nsLogFull = suffix;
     // Example: VerbTeX
     string nsLogPart = nsLogFull.Split(new string[] { Constants.NAMESPACE_SPLITTER }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
     // Try to get existing namespace with name VerbTeX
     var nsChild = parent.Children.FirstOrDefault(m => m.Name == nsLogPart);
     if (nsChild == null) {
         nsChild = new NamespaceViewModel(nsLogPart, application);
         nsChild.IsChecked = parent.IsChecked;
         parent.Children.Add(nsChild);
         nsChild.Parent = parent;
     }
     if (suffix.Contains(Constants.NAMESPACE_SPLITTER)) {
         HandleNamespace(nsChild, suffix.Substring(suffix.IndexOf(Constants.NAMESPACE_SPLITTER) + 1), application, log);
     } else {
         SetLogCountByLevel(log, nsChild);
     }
 }