예제 #1
0
 public Model(
     IInvokeSynchronization threadSync,
     Telemetry.ITelemetryCollector telemetryCollector,
     Persistence.IWebContentCache webCache,
     Persistence.IContentCache contentCache,
     Persistence.IStorageManager storageManager,
     IBookmarks bookmarks,
     ILogSourcesManager sourcesManager,
     IModelThreads threads,
     ITempFilesManager tempFilesManager,
     Preprocessing.IPreprocessingManagerExtensionsRegistry preprocessingManagerExtentionsRegistry,
     Preprocessing.ILogSourcesPreprocessingManager logSourcesPreprocessingManager,
     Preprocessing.IPreprocessingStepsFactory preprocessingStepsFactory,
     Progress.IProgressAggregator progressAggregator,
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     MRU.IRecentlyUsedEntities mru,
     Progress.IProgressAggregatorFactory progressAggregatorsFactory,
     IHeartBeatTimer heartbeat,
     ILogSourcesController logSourcesController,
     IShutdown shutdown,
     WebBrowserDownloader.IDownloader webBrowserDownloader,
     AppLaunch.ICommandLineHandler commandLineHandler,
     Postprocessing.IPostprocessorsManager postprocessorsManager,
     Postprocessing.IUserNamesProvider analyticsShortNames,
     Analytics.TimeSeries.ITimeSeriesTypesAccess timeSeriesTypes,
     Postprocessing.IAggregatingLogSourceNamesProvider logSourceNamesProvider
     )
 {
     this.ModelThreadSynchronization = threadSync;
     this.Telemetry        = telemetryCollector;
     this.WebContentCache  = webCache;
     this.ContentCache     = contentCache;
     this.StorageManager   = storageManager;
     this.Bookmarks        = bookmarks;
     this.SourcesManager   = sourcesManager;
     this.Threads          = threads;
     this.TempFilesManager = tempFilesManager;
     this.PreprocessingManagerExtensionsRegistry = preprocessingManagerExtentionsRegistry;
     this.PreprocessingStepsFactory      = preprocessingStepsFactory;
     this.LogSourcesPreprocessingManager = logSourcesPreprocessingManager;
     this.ProgressAggregator             = progressAggregator;
     this.LogProviderFactoryRegistry     = logProviderFactoryRegistry;
     this.UserDefinedFormatsManager      = userDefinedFormatsManager;
     this.ProgressAggregatorsFactory     = progressAggregatorsFactory;
     this.MRU                    = mru;
     this.Heartbeat              = heartbeat;
     this.LogSourcesController   = logSourcesController;
     this.Shutdown               = shutdown;
     this.WebBrowserDownloader   = webBrowserDownloader;
     this.CommandLineHandler     = commandLineHandler;
     this.PostprocessorsManager  = postprocessorsManager;
     this.ShortNames             = analyticsShortNames;
     this.TimeSeriesTypes        = timeSeriesTypes;
     this.LogSourceNamesProvider = logSourceNamesProvider;
 }
예제 #2
0
 public SearchObjectsFactory(
     Progress.IProgressAggregatorFactory progressAggregatorFactory,
     IInvokeSynchronization modelSynchronization,
     Settings.IGlobalSettingsAccessor settings,
     Telemetry.ITelemetryCollector telemetryCollector
     )
 {
     this.progressAggregatorFactory = progressAggregatorFactory;
     this.modelSynchronization      = modelSynchronization;
     this.settings           = settings;
     this.telemetryCollector = telemetryCollector;
 }
예제 #3
0
 public SearchObjectsFactory(
     Progress.IProgressAggregatorFactory progressAggregatorFactory,
     ISynchronizationContext modelSynchronization,
     Settings.IGlobalSettingsAccessor settings,
     Telemetry.ITelemetryCollector telemetryCollector,
     ITraceSourceFactory traceSourceFactory
     )
 {
     this.progressAggregatorFactory = progressAggregatorFactory;
     this.modelSynchronization      = modelSynchronization;
     this.settings           = settings;
     this.telemetryCollector = telemetryCollector;
     this.traceSourceFactory = traceSourceFactory;
 }
예제 #4
0
 public SearchManager(
     ILogSourcesManager sources,
     Progress.IProgressAggregatorFactory progressAggregatorFactory,
     IInvokeSynchronization modelSynchronization,
     Settings.IGlobalSettingsAccessor settings,
     Telemetry.ITelemetryCollector telemetryCollector,
     IHeartBeatTimer heartBeat
     ) : this(
         sources,
         modelSynchronization,
         heartBeat,
         new SearchObjectsFactory(progressAggregatorFactory, modelSynchronization, settings, telemetryCollector)
         )
 {
 }
예제 #5
0
 public SearchManager(
     ILogSourcesManager sources,
     Progress.IProgressAggregatorFactory progressAggregatorFactory,
     ISynchronizationContext modelSynchronization,
     Settings.IGlobalSettingsAccessor settings,
     Telemetry.ITelemetryCollector telemetryCollector,
     IChangeNotification changeNotification,
     ITraceSourceFactory traceSourceFactory
     ) : this(
         sources,
         modelSynchronization,
         new SearchObjectsFactory(progressAggregatorFactory, modelSynchronization, settings, telemetryCollector, traceSourceFactory),
         changeNotification
         )
 {
 }
예제 #6
0
 public Presenter(
     ILogSourcesManager logSources,
     IShutdown shutdown,
     Progress.IProgressAggregatorFactory progressFactory,
     IAlertPopup alerts,
     IFileDialogs fileDialogs,
     StatusReports.IPresenter statusReport
     )
 {
     this.logSources      = logSources;
     this.shutdown        = shutdown;
     this.progressFactory = progressFactory;
     this.alerts          = alerts;
     this.fileDialogs     = fileDialogs;
     this.statusReport    = statusReport;
 }
예제 #7
0
파일: Model.cs 프로젝트: rkapl123/logjoint
 public Model(
     ISynchronizationContext threadSync,
     IChangeNotification changeNotification,
     Persistence.IWebContentCache webCache,
     Persistence.IContentCache contentCache,
     Persistence.IStorageManager storageManager,
     IBookmarks bookmarks,
     ILogSourcesManager sourcesManager,
     IModelThreads threads,
     ITempFilesManager tempFilesManager,
     Preprocessing.IModel preprocessingModel,
     Progress.IProgressAggregator progressAggregator,
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     MRU.IRecentlyUsedEntities mru,
     Progress.IProgressAggregatorFactory progressAggregatorsFactory,
     IShutdown shutdown,
     WebViewTools.IWebViewTools webViewTools,
     Postprocessing.IModel postprocessingModel,
     IPluginsManager pluginsManager,
     ITraceSourceFactory traceSourceFactory,
     LogMedia.IFileSystem fileSystem
     )
 {
     this.SynchronizationContext = threadSync;
     this.ChangeNotification     = changeNotification;
     this.WebContentCache        = webCache;
     this.ContentCache           = contentCache;
     this.StorageManager         = storageManager;
     this.Bookmarks                  = bookmarks;
     this.SourcesManager             = sourcesManager;
     this.Threads                    = threads;
     this.TempFilesManager           = tempFilesManager;
     this.Preprocessing              = preprocessingModel;
     this.ProgressAggregator         = progressAggregator;
     this.LogProviderFactoryRegistry = logProviderFactoryRegistry;
     this.UserDefinedFormatsManager  = userDefinedFormatsManager;
     this.ProgressAggregatorsFactory = progressAggregatorsFactory;
     this.MRU                = mru;
     this.Shutdown           = shutdown;
     this.WebViewTools       = webViewTools;
     this.Postprocessing     = postprocessingModel;
     this.PluginsManager     = pluginsManager;
     this.TraceSourceFactory = traceSourceFactory;
     this.FileSystem         = fileSystem;
 }
예제 #8
0
        public SearchResult(
            ISearchManagerInternal owner,
            SearchAllOptions options,
            IFilter optionsFilter,
            IList <ILogSourceSearchWorkerInternal> workers,
            Progress.IProgressAggregatorFactory progressAggregatorFactory,
            ISynchronizationContext modelSynchronization,
            Settings.IGlobalSettingsAccessor settings,
            int id,
            ISearchObjectsFactory factory,
            ITraceSourceFactory traceSourceFactory
            )
        {
            this.owner                = owner;
            this.options              = options;
            this.optionsFilter        = optionsFilter;
            this.factory              = factory;
            this.modelSynchronization = modelSynchronization;
            this.id                     = id;
            this.cancellation           = new CancellationTokenSource();
            this.results                = new List <ISourceSearchResultInternal>();
            this.progressAggregator     = progressAggregatorFactory.CreateProgressAggregator();
            this.updateInvokationHelper = new AsyncInvokeHelper(modelSynchronization, UpdateStatus);
            this.hitsLimit              = settings.MaxNumberOfHitsInSearchResultsView;
            this.visible                = true;
            this.trace                  = traceSourceFactory.CreateTraceSource("SearchManager", "sr." + id.ToString());
            this.timeGapsDetector       = new TimeGapsDetector(trace, modelSynchronization, this, traceSourceFactory);

            this.timeGapsDetector.OnTimeGapsChanged += (s, e) =>
            {
                owner.OnResultChanged(this, SearchResultChangeFlag.TimeGapsChanged);
            };

            this.progressAggregator.ProgressChanged += HandleProgressChanged;

            this.searchTime = Stopwatch.StartNew();
            this.results.AddRange(workers.Select(w => factory.CreateSourceSearchResults(w, this, cancellation.Token, progressAggregator)));
            if (results.Count == 0)
            {
                status = SearchResultStatus.Finished;
                HandleFinalStateTransition();
            }
        }