public ProfileFiltersViewModel(FiltersProfile filtersProfile, LogPaneServices logPaneServices) { FiltersProfile = filtersProfile; this.logPaneServices = logPaneServices; LogLevels = new BindableCollection <LogLevelFilterViewModel>( FiltersProfile.LogLevels.Select(ll => new LogLevelFilterViewModel(logPaneServices, ll))); MinLogLevel = LogLevels.First(); SourceFilterRootViewModel = new SourceFilterViewModel(filtersProfile.SourceFilterRoot, logPaneServices); }
public LogPaneViewModel([NotNull] ReceiverBase receiver) { if (receiver == null) { throw new ArgumentNullException(nameof(receiver)); } Receiver = receiver; var filtersProfile = new FiltersProfile(); LogMessages.CollectionChanged += LogMessagesOnCollectionChanged; ProfileFiltersViewModel = new ProfileFiltersViewModel(filtersProfile, LogPaneServices); filterLogic = new FilterLogic(filtersProfile); ProfilesFiltersViewModel = new ProfilesFiltersViewModel(filtersProfile, LogPaneServices); searchTextChangedSubscriber = ProfileFiltersViewModel.SubscribeToPropertyChanged(vm => vm.SearchText, OnSearchTextChanged); ProfilesFiltersViewModel.ActivateWith(this); LogPaneServices.EventAggregator.Subscribe(this); }
public ProfilesFiltersViewModel(FiltersProfile filtersProfile, LogPaneServices logPaneServices) { this.filtersProfile = filtersProfile; this.logPaneServices = logPaneServices; }