public OutputDataDeserializer(TimeSeries.ITimeSeriesTypesAccess timeSeriesTypesAccess, ILogPartTokenFactories logPartTokenFactories, Correlation.ISameNodeDetectionTokenFactories nodeDetectionTokenFactories) { this.timeSeriesTypesAccess = timeSeriesTypesAccess; this.logPartTokenFactories = logPartTokenFactories; this.nodeDetectionTokenFactories = nodeDetectionTokenFactories; }
public PostprocessorsManager( ILogSourcesManager logSources, Telemetry.ITelemetryCollector telemetry, ISynchronizationContext modelSyncContext, ISynchronizationContext threadPoolSyncContext, IHeartBeatTimer heartbeat, Progress.IProgressAggregator progressAggregator, Settings.IGlobalSettingsAccessor settingsAccessor, IOutputDataDeserializer outputDataDeserializer, ITraceSourceFactory traceSourceFactory, ILogPartTokenFactories logPartTokenFactories, Correlation.ISameNodeDetectionTokenFactories sameNodeDetectionTokenFactories, IChangeNotification changeNotification, LogMedia.IFileSystem logFileSystem ) { this.logSources = logSources; this.telemetry = telemetry; this.progressAggregator = progressAggregator; this.settingsAccessor = settingsAccessor; this.modelSyncContext = modelSyncContext; this.threadPoolSyncContext = threadPoolSyncContext; this.heartbeat = heartbeat; this.outputDataDeserializer = outputDataDeserializer; this.logPartTokenFactories = logPartTokenFactories; this.sameNodeDetectionTokenFactories = sameNodeDetectionTokenFactories; this.changeNotification = changeNotification; this.logFileSystem = logFileSystem; this.tracer = traceSourceFactory.CreateTraceSource("App", "ppm"); this.updater = new AsyncInvokeHelper(modelSyncContext, Refresh); logSources.OnLogSourceAdded += (sender, args) => updater.Invoke(); logSources.OnLogSourceRemoved += (sender, args) => updater.Invoke(); logSources.OnLogSourceAnnotationChanged += (sender, args) => updater.Invoke(); logSources.OnLogSourceStatsChanged += (object sender, LogSourceStatsEventArgs e) => { if ((e.Flags & LogProviderStatsFlag.ContentsEtag) != 0) { updater.Invoke(); } }; this.visiblePostprocessorsOutputs = Selectors.Create( () => postprocessorsOutputs, () => logSources.Items, (outputs, sources) => { var sourcesMap = sources.ToLookup(s => s); return(ImmutableArray.CreateRange(outputs.Where(output => sourcesMap.Contains(output.LogSource)))); } ); Refresh(); }