public LogViewerViewModel(IDataSourceViewModel dataSource, IActionCenter actionCenter, IApplicationSettings applicationSettings, TimeSpan maximumWaitTime) { _actionCenter = actionCenter ?? throw new ArgumentNullException(nameof(actionCenter)); _applicationSettings = applicationSettings ?? throw new ArgumentNullException(nameof(applicationSettings)); _maximumWaitTime = maximumWaitTime; _dataSource = dataSource ?? throw new ArgumentNullException(nameof(dataSource)); _pendingSections = new List <KeyValuePair <ILogSource, LogSourceModification> >(); LogSource = _dataSource.DataSource.FilteredLogSource; LogSource.AddListener(this, _maximumWaitTime, 1000); Search = _dataSource.DataSource.Search; UpdateCounts(); }