public ActiveAnalysis( AnalysisId id, AnalysisTemplate template, ITaskScheduler taskScheduler, ILogAnalyserEngine logAnalyserEngine, TimeSpan maximumWaitTime) { if (template == null) { throw new ArgumentNullException(nameof(template)); } if (taskScheduler == null) { throw new ArgumentNullException(nameof(taskScheduler)); } if (logAnalyserEngine == null) { throw new ArgumentNullException(nameof(logAnalyserEngine)); } _id = id; _template = template; _taskScheduler = taskScheduler; _maximumWaitTime = maximumWaitTime; _logFiles = new List <ILogFile>(); _logFile = new LogFileProxy(taskScheduler, maximumWaitTime); _logAnalyserEngine = logAnalyserEngine; _analysers = new Dictionary <DataSourceAnalyser, AnalyserTemplate>(); _syncRoot = new object(); }
public AnalysisStorage(ITaskScheduler taskScheduler, IFilesystem filesystem, ILogAnalyserEngine logAnalyserEngine, ITypeFactory typeFactory = null) { if (taskScheduler == null) { throw new ArgumentNullException(nameof(taskScheduler)); } if (filesystem == null) { throw new ArgumentNullException(nameof(filesystem)); } if (logAnalyserEngine == null) { throw new ArgumentNullException(nameof(logAnalyserEngine)); } _taskScheduler = taskScheduler; _logAnalyserEngine = logAnalyserEngine; _filesystem = filesystem; _syncRoot = new object(); _snapshots = new SnapshotsWatchdog(taskScheduler, filesystem, typeFactory); _templates = new List <ActiveAnalysisConfiguration>(); _analyses = new Dictionary <AnalysisId, ActiveAnalysis>(); _lastSavedAnalyses = new Dictionary <AnalysisId, ActiveAnalysisConfiguration>(); }
public DataSourceAnalyserEngine(ITaskScheduler scheduler, ILogAnalyserEngine logAnalyserEngine, IPluginLoader pluginLoader = null) { _scheduler = scheduler ?? throw new ArgumentNullException(nameof(scheduler)); _logAnalyserEngine = logAnalyserEngine ?? throw new ArgumentNullException(nameof(logAnalyserEngine)); _syncRoot = new object(); _dataSourceAnalysers = new List <IDataSourceAnalyser>(); _factoriesById = new Dictionary <AnalyserPluginId, IDataSourceAnalyserPlugin>(); if (pluginLoader != null) { foreach (var plugin in pluginLoader.LoadAllOfType <IDataSourceAnalyserPlugin>()) { RegisterFactory(plugin); } } }
public AnalysisStorage(ITaskScheduler taskScheduler, IFilesystem filesystem, ILogAnalyserEngine logAnalyserEngine, ITypeFactory typeFactory) { _taskScheduler = taskScheduler ?? throw new ArgumentNullException(nameof(taskScheduler)); _logAnalyserEngine = logAnalyserEngine ?? throw new ArgumentNullException(nameof(logAnalyserEngine)); _filesystem = filesystem ?? throw new ArgumentNullException(nameof(filesystem)); _typeFactory = typeFactory ?? throw new ArgumentNullException(nameof(typeFactory)); _syncRoot = new object(); _snapshots = new SnapshotsWatchdog(taskScheduler, filesystem, typeFactory); _templates = new List<ActiveAnalysisConfiguration>(); _analyses = new Dictionary<AnalysisId, ActiveAnalysis>(); _lastSavedAnalyses = new Dictionary<AnalysisId, ActiveAnalysisConfiguration>(); // TODO: Maybe don't block in the ctor in the future? // If we do that, the public interface will have to be changed RestoreSavedAnalysesAsync().Wait(); }
public DataSourceAnalyser(AnalyserTemplate template, ILogFile logFile, ILogAnalyserEngine logAnalyserEngine) { if (template == null) { throw new ArgumentNullException(nameof(template)); } if (logFile == null) { throw new ArgumentNullException(nameof(logFile)); } if (logAnalyserEngine == null) { throw new ArgumentNullException(nameof(logAnalyserEngine)); } _template = template; _logFile = logFile; _logAnalyserEngine = logAnalyserEngine; }