Exemplo n.º 1
0
        public RawLoggerViewModel(ILogInterceptor logIntercetptor)
        {

            _interceptor = logIntercetptor;
            _Logs = new ObservableCollection<LogMessageViewModel>();
            Commands = new ObservableCollection<AggregateLogMessageViewModel>();
            Handlers = new ObservableCollection<AggregateLogMessageViewModel>();
            AggregatedLogs = new ObservableCollection<OpTypeLoggerViewModel>();
            CvsLogs = new CollectionViewSource();
            CvsLogs.Source = _Logs;
            CvsLogs.Filter += CvsLogsFilter;
            Logs = CvsLogs.View;
            _interceptor.LogIntercepted += LogIntercepted;

            PropertyChangedObserver.Monitor(this)
                .HandleChangesOf(vm => vm.LevelFilter, EvaluateFilter)
                .HandleChangesOf(vm => vm.MainFilter, EvaluateFilter);

            SpecificLoggers = new ObservableCollection<SpecificLoggerViewModel>();
            var specificLoggersOption = Properties.Settings.Default.SpecificLoggerList;
            if (!String.IsNullOrWhiteSpace(specificLoggersOption)) 
            {
                var specifiLoggerList = specificLoggersOption.Split(',', ';');
                foreach (var sl in specifiLoggerList)
                {
                    SpecificLoggers.Add(new SpecificLoggerViewModel(sl, _Logs));
                }
            }
            SpecificLoggers.CollectionChanged += SpecificLoggersCollectionChanged;
            Root = new LoggerViewModel("root");
        }
Exemplo n.º 2
0
        public RawLoggerViewModel(ILogInterceptor logIntercetptor)
        {
            _interceptor    = logIntercetptor;
            _Logs           = new ObservableCollection <LogMessageViewModel>();
            Commands        = new ObservableCollection <AggregateLogMessageViewModel>();
            Handlers        = new ObservableCollection <AggregateLogMessageViewModel>();
            AggregatedLogs  = new ObservableCollection <OpTypeLoggerViewModel>();
            CvsLogs         = new CollectionViewSource();
            CvsLogs.Source  = _Logs;
            CvsLogs.Filter += CvsLogsFilter;
            Logs            = CvsLogs.View;
            _interceptor.LogIntercepted += LogIntercepted;

            PropertyChangedObserver.Monitor(this)
            .HandleChangesOf(vm => vm.LevelFilter, EvaluateFilter)
            .HandleChangesOf(vm => vm.MainFilter, EvaluateFilter);

            SpecificLoggers = new ObservableCollection <SpecificLoggerViewModel>();
            var specificLoggersOption = Properties.Settings.Default.SpecificLoggerList;

            if (!String.IsNullOrWhiteSpace(specificLoggersOption))
            {
                var specifiLoggerList = specificLoggersOption.Split(',', ';');
                foreach (var sl in specifiLoggerList)
                {
                    SpecificLoggers.Add(new SpecificLoggerViewModel(sl, _Logs));
                }
            }
            SpecificLoggers.CollectionChanged += SpecificLoggersCollectionChanged;
            Root = new LoggerViewModel("root");
        }
Exemplo n.º 3
0
        public RawLoggerViewModel(ILogInterceptor logIntercetptor)
        {
            _interceptor    = logIntercetptor;
            _Logs           = new ObservableCollection <LogMessageViewModel>();
            Commands        = new ObservableCollection <AggregateLogMessageViewModel>();
            Handlers        = new ObservableCollection <AggregateLogMessageViewModel>();
            AggregatedLogs  = new ObservableCollection <OpTypeLoggerViewModel>();
            CvsLogs         = new CollectionViewSource();
            CvsLogs.Source  = _Logs;
            CvsLogs.Filter += CvsLogsFilter;
            Logs            = CvsLogs.View;
            _interceptor.LogIntercepted += LogIntercepted;

            PropertyChangedObserver.Monitor(this)
            .HandleChangesOf(vm => vm.LevelFilter, EvaluateFilter)
            .HandleChangesOf(vm => vm.MainFilter, EvaluateFilter);
        }
Exemplo n.º 4
0
        public RawLoggerViewModel(ILogInterceptor logIntercetptor)
        {

            _interceptor = logIntercetptor;
            _Logs = new ObservableCollection<LogMessageViewModel>();
            Commands = new ObservableCollection<AggregateLogMessageViewModel>();
            Handlers = new ObservableCollection<AggregateLogMessageViewModel>();
            AggregatedLogs = new ObservableCollection<OpTypeLoggerViewModel>();
            CvsLogs = new CollectionViewSource();
            CvsLogs.Source = _Logs;
            CvsLogs.Filter += CvsLogsFilter;
            Logs = CvsLogs.View;
            _interceptor.LogIntercepted += LogIntercepted;

            PropertyChangedObserver.Monitor(this)
                .HandleChangesOf(vm => vm.LevelFilter, EvaluateFilter)
                .HandleChangesOf(vm => vm.MainFilter, EvaluateFilter);
        }