Esempio n. 1
0
 public NativeXMLFormatFactory(ITempFilesManager tempFiles, IRegexFactory regexFactory, ITraceSourceFactory traceSourceFactory)
 {
     this.tempFiles          = tempFiles;
     this.regexFactory       = regexFactory;
     this.traceSourceFactory = traceSourceFactory;
     this.nativeFormatInfo   = XmlFormatInfo.MakeNativeFormatInfo("utf-8", null, new FormatViewOptions(), regexFactory);
 }
        public PluginTabPagePresenter(
            IView view,
            IPostprocessorsManager postprocessorsManager,
            IPostprocessorOutputFormFactory outputFormsFactory,
            ILogSourcesManager logSourcesManager,
            ITempFilesManager tempFiles,
            IShellOpen shellOpen,
            NewLogSourceDialog.IPresenter newLogSourceDialog,
            Telemetry.ITelemetryCollector telemetry
            )
        {
            this.view = view;
            this.view.SetEventsHandler(this);
            this.postprocessorsManager = postprocessorsManager;
            this.outputFormsFactory    = outputFormsFactory;
            this.tempFiles             = tempFiles;
            this.shellOpen             = shellOpen;
            this.newLogSourceDialog    = newLogSourceDialog;
            this.telemetry             = telemetry;

            logSourcesManager.OnLogSourceAnnotationChanged += (sender, e) =>
            {
                RefreshView();
            };
        }
Esempio n. 3
0
 public Factory(
     IAlertPopup alerts,
     IFileDialogs fileDialogs,
     Help.IPresenter help,
     ILogProviderFactoryRegistry registry,
     IFormatDefinitionsRepository repo,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     ITempFilesManager tempFilesManager,
     ITraceSourceFactory traceSourceFactory,
     RegularExpressions.IRegexFactory regexFactory,
     LogViewer.IPresenterFactory logViewerPresenterFactory,
     IViewsFactory viewFactories,
     ISynchronizationContext synchronizationContext,
     FieldsProcessor.IFactory fieldsProcessorFactory
     )
 {
     this.viewFactories             = viewFactories;
     this.alerts                    = alerts;
     this.registry                  = registry;
     this.fileDialogs               = fileDialogs;
     this.userDefinedFormatsManager = userDefinedFormatsManager;
     this.help                      = help;
     this.repo                      = repo;
     this.tempFilesManager          = tempFilesManager;
     this.logViewerPresenterFactory = logViewerPresenterFactory;
     this.traceSourceFactory        = traceSourceFactory;
     this.regexFactory              = regexFactory;
     this.synchronizationContext    = synchronizationContext;
     this.fieldsProcessorFactory    = fieldsProcessorFactory;
 }
 public PostprocessorsFactory(
     ITempFilesManager tempFiles,
     Postprocessing.IModel postprocessing)
 {
     this.tempFiles      = tempFiles;
     this.postprocessing = postprocessing;
 }
Esempio n. 5
0
 public WorkspacesManager(
     ILogSourcesManager logSources,
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     IStorageManager storageManager,
     Backend.IBackendAccess backend,
     ITempFilesManager tempFilesManager,
     MRU.IRecentlyUsedEntities recentlyUsedEntities,
     IShutdown shutdown,
     ITraceSourceFactory traceSourceFactory
     )
 {
     this.tracer                     = traceSourceFactory.CreateTraceSource("Workspaces", "ws");
     this.logSources                 = logSources;
     this.backendAccess              = backend;
     this.tempFilesManager           = tempFilesManager;
     this.logProviderFactoryRegistry = logProviderFactoryRegistry;
     this.storageManager             = storageManager;
     this.recentlyUsedEntities       = recentlyUsedEntities;
     if (backend.IsConfigured)
     {
         this.status = WorkspacesManagerStatus.NoWorkspace;
     }
     else
     {
         this.status = WorkspacesManagerStatus.Unavailable;
     }
     shutdown.Cleanup += (s, e) => shutdown.AddCleanupTask(
         WaitUploadCompletion().WithTimeout(TimeSpan.FromSeconds(10)));
 }
Esempio n. 6
0
 public Factory(
     ITempFilesManager tempFiles,
     ITraceSourceFactory traceSourceFactory,
     MultiInstance.IInstancesCounter mutualExecutionCounter,
     IShutdown shutdown,
     ISynchronizationContext synchronizationContext,
     Persistence.IFirstStartDetector firstStartDetector,
     Telemetry.ITelemetryCollector telemetry,
     Persistence.IStorageManager storage,
     IChangeNotification changeNotification,
     string autoUpdateUrl,
     string pluginsIndexUrl
     )
 {
     this.tempFiles              = tempFiles;
     this.traceSourceFactory     = traceSourceFactory;
     this.shutdown               = shutdown;
     this.synchronizationContext = synchronizationContext;
     this.mutualExecutionCounter = mutualExecutionCounter;
     this.firstStartDetector     = firstStartDetector;
     this.telemetry              = telemetry;
     this.storage            = storage;
     this.changeNotification = changeNotification;
     this.autoUpdateUrl      = autoUpdateUrl;
     this.pluginsIndexUrl    = pluginsIndexUrl;
 }
Esempio n. 7
0
        public UserDefinedFormatFactory(UserDefinedFactoryParams createParams)
            : base(createParams)
        {
            var formatSpecificNode = createParams.FormatSpecificNode;

            ReadPatterns(formatSpecificNode, patterns);

            var boundsNodes = formatSpecificNode.Elements("bounds").Take(1);
            var beginFinder = BoundFinder.CreateBoundFinder(boundsNodes.Select(n => n.Element("begin")).FirstOrDefault());
            var endFinder   = BoundFinder.CreateBoundFinder(boundsNodes.Select(n => n.Element("end")).FirstOrDefault());

            this.tempFilesManager = createParams.TempFilesManager;

            formatInfo = new Lazy <JsonFormatInfo>(() =>
            {
                string transform = ReadParameter(formatSpecificNode, "transform");
                if (transform == null)
                {
                    throw new Exception("Wrong JSON format definition: transform is not defined");
                }

                LoadedRegex head = ReadRe(formatSpecificNode, "head-re", ReOptions.Multiline);
                LoadedRegex body = ReadRe(formatSpecificNode, "body-re", ReOptions.Singleline);
                string encoding  = ReadParameter(formatSpecificNode, "encoding");

                DejitteringParams?dejitteringParams = DejitteringParams.FromConfigNode(
                    formatSpecificNode.Element("dejitter"));

                TextStreamPositioningParams textStreamPositioningParams = TextStreamPositioningParams.FromConfigNode(
                    formatSpecificNode);

                return(new JsonFormatInfo(transform, head, body, beginFinder, endFinder,
                                          encoding, textStreamPositioningParams, dejitteringParams, viewOptions));
            });
        }
Esempio n. 8
0
 public static void DeleteIfTemporary(this ITempFilesManager tempFiles, string fileName)
 {
     if (tempFiles.IsTemporaryFile(fileName))
     {
         File.Delete(fileName);
     }
 }
Esempio n. 9
0
        public Presenter(
            IView view,
            IManager postprocessorsManager,
            IPostprocessorOutputFormFactory outputFormsFactory,
            ILogSourcesManager logSourcesManager,
            ITempFilesManager tempFiles,
            IShellOpen shellOpen,
            NewLogSourceDialog.IPresenter newLogSourceDialog,
            Telemetry.ITelemetryCollector telemetry,
            IChangeNotification changeNotification,
            MainForm.IPresenter mainFormPresenter
            )
        {
            this.view = view;
            this.postprocessorsManager = postprocessorsManager;
            this.outputFormsFactory    = outputFormsFactory;
            this.tempFiles             = tempFiles;
            this.shellOpen             = shellOpen;
            this.newLogSourceDialog    = newLogSourceDialog;
            this.telemetry             = telemetry;
            this.changeNotification    = changeNotification.CreateChainedChangeNotification(false);

            this.view.SetViewModel(this);

            logSourcesManager.OnLogSourceAnnotationChanged += (sender, e) =>
            {
                RefreshView();
            };

            // todo: create when there a least one postprocessor exists. Postprocessors may come from plugins or it can be internal trace.

            mainFormPresenter.AddCustomTab(view.UIControl, TabCaption, this);
            mainFormPresenter.TabChanging += (sender, e) => OnTabPageSelected(e.CustomTabTag == this);
        }
Esempio n. 10
0
        public Presenter(
            IView view,
            ITempFilesManager tempFilesManager,
            ITraceSourceFactory traceSourceFactory,
            RegularExpressions.IRegexFactory regexFactory,
            LogViewer.IPresenterFactory logViewerPresenterFactory,
            ISynchronizationContext synchronizationContext,
            LogMedia.IFileSystem fileSystem
            )
        {
            this.view = view;
            this.view.SetEventsHandler(this);
            this.tempFilesManager       = tempFilesManager;
            this.traceSourceFactory     = traceSourceFactory;
            this.regexFactory           = regexFactory;
            this.synchronizationContext = synchronizationContext;
            this.fileSystem             = fileSystem;

            this.threads          = new ModelThreads();
            this.logSourceThreads = new LogSourceThreads(
                LJTraceSource.EmptyTracer, threads, null);
            this.model            = new Presenters.LogViewer.DummyModel();
            this.logPresenter     = logViewerPresenterFactory.CreateIsolatedPresenter(model, view.LogViewer);
            logPresenter.ShowTime = true;
            logPresenter.EmptyViewMessageAllowed = false;
        }
        public static bool?TestParsing(
            string sampleLog,
            IAlertPopup alerts,
            ITempFilesManager tempFilesManager,
            IObjectFactory objectsFactory,
            XmlNode formatRoot,
            string formatSpecificNodeName
            )
        {
            if (sampleLog == "")
            {
                alerts.ShowPopup("", "Provide sample log first", AlertFlags.Ok | AlertFlags.WarningIcon);
                return(null);
            }

            string tmpLog = tempFilesManager.GenerateNewName();

            try
            {
                XDocument clonedFormatXmlDocument = XDocument.Parse(formatRoot.OuterXml);

                UserDefinedFactoryParams createParams;
                createParams.Entry              = null;
                createParams.RootNode           = clonedFormatXmlDocument.Element("format");
                createParams.FormatSpecificNode = createParams.RootNode.Element(formatSpecificNodeName);
                createParams.FactoryRegistry    = null;
                createParams.TempFilesManager   = tempFilesManager;

                // Temporary sample file is always written in Unicode wo BOM: we don't test encoding detection,
                // we test regexps correctness.
                using (var w = new StreamWriter(tmpLog, false, new UnicodeEncoding(false, false)))
                    w.Write(sampleLog);
                ChangeEncodingToUnicode(createParams);

                var cp = ConnectionParamsUtils.CreateFileBasedConnectionParamsFromFileName(tmpLog);

                ILogProviderFactory f;
                if (formatSpecificNodeName == "regular-grammar")
                {
                    f = new RegularGrammar.UserDefinedFormatFactory(createParams);
                }
                else if (formatSpecificNodeName == "xml")
                {
                    f = new XmlFormat.UserDefinedFormatFactory(createParams);
                }
                else
                {
                    return(null);
                }
                using (f as IDisposable)
                    using (var interaction = objectsFactory.CreateTestDialog())
                    {
                        return(interaction.ShowDialog(f, cp));
                    }
            }
            finally
            {
                File.Delete(tmpLog);
            }
        }
Esempio n. 12
0
        public static string CreateEmptyFile(this ITempFilesManager tempFiles)
        {
            string fname = tempFiles.GenerateNewName();

            File.Create(fname).Close();
            return(fname);
        }
Esempio n. 13
0
 public Model(ITempFilesManager tempFiles,
              ILogPartTokenFactories logPartTokenFactories, ISameNodeDetectionTokenFactories nodeDetectionTokenFactories)
 {
     this.tempFiles                   = tempFiles;
     this.logPartTokenFactories       = logPartTokenFactories;
     this.nodeDetectionTokenFactories = nodeDetectionTokenFactories;
 }
Esempio n. 14
0
        public LogSourcesPreprocessingManager(
            ISynchronizationContext invokeSynchronize,
            IFormatAutodetect formatAutodetect,
            IExtensionsRegistry extensions,
            IPreprocessingManagerExtension builtinStepsExtension,
            Telemetry.ITelemetryCollector telemetry,
            ITempFilesManager tempFilesManager,
            ILogSourcesManager logSourcesManager,
            IShutdown shutdown,
            ITraceSourceFactory traceSourceFactory,
            IChangeNotification changeNotification
            )
        {
            this.traceSourceFactory = traceSourceFactory;
            this.trace                   = traceSourceFactory.CreateTraceSource("PreprocessingManager", "prepr");
            this.invokeSynchronize       = invokeSynchronize;
            this.formatAutodetect        = formatAutodetect;
            this.providerYieldedCallback = prov => logSourcesManager.Create(prov.Factory, prov.ConnectionParams).Visible = !prov.IsHiddenLog;
            this.extensions              = extensions;
            this.telemetry               = telemetry;
            this.tempFilesManager        = tempFilesManager;
            this.logSourcesManager       = logSourcesManager;
            this.changeNotification      = changeNotification;

            extensions.Register(builtinStepsExtension);

            shutdown.Cleanup += (sender, e) =>
            {
                shutdown.AddCleanupTask(this.DeleteAllPreprocessings());
            };
        }
Esempio n. 15
0
        public LogSource(ILogSourcesManagerInternal owner, int id,
                         ILogProviderFactory providerFactory, IConnectionParams connectionParams,
                         IModelThreads threads, ITempFilesManager tempFilesManager, Persistence.IStorageManager storageManager,
                         IInvokeSynchronization invoker, Settings.IGlobalSettingsAccessor globalSettingsAccess, IBookmarks bookmarks)
        {
            this.owner                = owner;
            this.tracer               = new LJTraceSource("LogSource", string.Format("ls{0:D2}", id));
            this.tempFilesManager     = tempFilesManager;
            this.invoker              = invoker;
            this.globalSettingsAccess = globalSettingsAccess;
            this.bookmarks            = bookmarks;

            try
            {
                this.logSourceThreads              = new LogSourceThreads(this.tracer, threads, this);
                this.timeGaps                      = new TimeGapsDetector(tracer, invoker, new LogSourceGapsSource(this));
                this.timeGaps.OnTimeGapsChanged   += timeGaps_OnTimeGapsChanged;
                this.logSourceSpecificStorageEntry = CreateLogSourceSpecificStorageEntry(providerFactory, connectionParams, storageManager);

                var extendedConnectionParams = connectionParams.Clone(true);
                this.LoadPersistedSettings(extendedConnectionParams);
                this.provider = providerFactory.CreateFromConnectionParams(this, extendedConnectionParams);
            }
            catch (Exception e)
            {
                tracer.Error(e, "Failed to initialize log source");
                ((ILogSource)this).Dispose();
                throw;
            }

            this.owner.Container.Add(this);
            this.owner.FireOnLogSourceAdded(this);

            this.LoadBookmarks();
        }
Esempio n. 16
0
        // On windows: download update to a folder next to installation dir.
        // This ensures almost 100% that temp folder and installation dir are on the same HDD partition
        // which ensures speed and success of moving the temp folder in place of installation dir.
        static string GetTempInstallationDir(string installationDir, ITempFilesManager tempFiles)
        {
            var    localUpdateCheckId  = Guid.NewGuid().GetHashCode();
            string tempInstallationDir = Path.GetFullPath(string.Format(@"{0}\..\pending-logjoint-update-{1:x}",
                                                                        installationDir, localUpdateCheckId));

            return(tempInstallationDir);
        }
Esempio n. 17
0
        static string GetTempInstallationDir(string installationDir, ITempFilesManager tempFiles)
        {
            string tempInstallationDir = Path.Combine(
                tempFiles.GenerateNewName(),
                "pending-logjoint-update");

            return(tempInstallationDir);
        }
Esempio n. 18
0
        static DetectedFormat DetectFormat(
            string fileName,
            Func <ILogProviderFactory, int> mruIndexGetter,
            ILogProviderFactoryRegistry factoriesRegistry,
            CancellationToken cancellation,
            IFormatAutodetectionProgress progress,
            ITempFilesManager tempFilesManager)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentException("fileName");
            }
            if (mruIndexGetter == null)
            {
                throw new ArgumentNullException("mru");
            }
            var log = LJTraceSource.EmptyTracer;

            using (log.NewFrame)
                using (SimpleFileMedia fileMedia = new SimpleFileMedia(
                           SimpleFileMedia.CreateConnectionParamsFromFileName(fileName)))
                    using (ILogSourceThreads threads = new LogSourceThreads())
                    {
                        foreach (ILogProviderFactory factory in GetOrderedListOfRelevantFactories(fileName, mruIndexGetter, factoriesRegistry))
                        {
                            log.Info("Trying {0}", factory);
                            if (progress != null)
                            {
                                progress.Trying(factory);
                            }
                            if (cancellation.IsCancellationRequested)
                            {
                                return(null);
                            }
                            try
                            {
                                using (var reader = ((IMediaBasedReaderFactory)factory).CreateMessagesReader(
                                           new MediaBasedReaderParams(threads, fileMedia, tempFilesManager, MessagesReaderFlags.QuickFormatDetectionMode)))
                                {
                                    reader.UpdateAvailableBounds(false);
                                    using (var parser = reader.CreateParser(new CreateParserParams(0, null, MessagesParserFlag.DisableMultithreading, MessagesParserDirection.Forward)))
                                    {
                                        if (parser.ReadNext() != null)
                                        {
                                            log.Info("Autodetected format of {0}: {1}", fileName, factory);
                                            return(new DetectedFormat(factory, ((IFileBasedLogProviderFactory)factory).CreateParams(fileName)));
                                        }
                                    }
                                }
                            }
                            catch (Exception e)
                            {
                                log.Error(e, "Failed to load '{0}' as {1}", fileName, factory);
                            }
                        }
                    }
            return(null);
        }
Esempio n. 19
0
 public MediaBasedReaderParams(ILogSourceThreads threads, ILogMedia media, ITempFilesManager tempFilesManager, MessagesReaderFlags flags = MessagesReaderFlags.None,
                               Settings.IGlobalSettingsAccessor settingsAccessor = null)
 {
     Threads          = threads;
     Media            = media;
     Flags            = flags;
     TempFilesManager = tempFilesManager;
     SettingsAccessor = settingsAccessor ?? Settings.DefaultSettingsAccessor.Instance;
 }
Esempio n. 20
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;
 }
Esempio n. 21
0
 public AppInitializer(
     LJTraceSource tracer,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     ILogProviderFactoryRegistry factoryRegistry,
     ITempFilesManager tempFiles)
 {
     InitializePlatform(tracer);
     InitLogFactories(userDefinedFormatsManager, factoryRegistry, tempFiles);
     userDefinedFormatsManager.ReloadFactories();
 }
Esempio n. 22
0
 public MediaBasedReaderParams(ILogSourceThreadsInternal threads, ILogMedia media, ITempFilesManager tempFilesManager, ITraceSourceFactory traceSourceFactory, MessagesReaderFlags flags = MessagesReaderFlags.None,
                               Settings.IGlobalSettingsAccessor settingsAccessor = null, string parentLoggingPrefix = null)
 {
     Threads             = threads;
     Media               = media;
     Flags               = flags;
     TempFilesManager    = tempFilesManager;
     TraceSourceFactory  = traceSourceFactory;
     SettingsAccessor    = settingsAccessor ?? Settings.DefaultSettingsAccessor.Instance;
     ParentLoggingPrefix = parentLoggingPrefix;
 }
 public CorrelatorPostprocessorControlHandler(
     IPostprocessorsManager postprocessorsManager,
     ITempFilesManager tempFilesManager,
     IShellOpen shellOpen
     )
 {
     this.postprocessorsManager = postprocessorsManager;
     this.tempFilesManager      = tempFilesManager;
     this.postprocessorId       = PostprocessorIds.Correlator;
     this.shellOpen             = shellOpen;
 }
Esempio n. 24
0
 static void InitLogFactories(
     IUserDefinedFormatsManager userDefinedFormatsManager,
     ILogProviderFactoryRegistry factoryRegistry,
     ITempFilesManager tempFiles)
 {
     RegularGrammar.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     XmlFormat.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     JsonFormat.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     factoryRegistry.Register(new PlainText.Factory(tempFiles));
     factoryRegistry.Register(new XmlFormat.NativeXMLFormatFactory(tempFiles));
 }
Esempio n. 25
0
 public LogSourcesManager(
     IHeartBeatTimer heartbeat,
     IInvokeSynchronization invoker,
     IModelThreads threads,
     ITempFilesManager tempFilesManager,
     Persistence.IStorageManager storageManager,
     IBookmarks bookmarks,
     Settings.IGlobalSettingsAccessor globalSettingsAccess
     ) : this(heartbeat,
              new LogSourceFactory(threads, bookmarks, invoker, storageManager, tempFilesManager, globalSettingsAccess))
 {
 }
Esempio n. 26
0
 public TestParsing(
     IAlertPopup alerts,
     ITempFilesManager tempFilesManager,
     ITraceSourceFactory traceSourceFactory,
     IFactory objectsFactory
     )
 {
     this.alerts             = alerts;
     this.tempFilesManager   = tempFilesManager;
     this.traceSourceFactory = traceSourceFactory;
     this.objectsFactory     = objectsFactory;
 }
Esempio n. 27
0
 public UserDefinedFormatsManager(
     IFormatDefinitionsRepository repository,
     ILogProviderFactoryRegistry registry,
     ITempFilesManager tempFilesManager,
     ITraceSourceFactory traceSourceFactory
     )
 {
     this.repository         = repository ?? throw new ArgumentNullException(nameof(repository));
     this.registry           = registry ?? throw new ArgumentNullException(nameof(registry));
     this.tempFilesManager   = tempFilesManager;
     this.traceSourceFactory = traceSourceFactory;
     this.tracer             = traceSourceFactory.CreateTraceSource("UserDefinedFormatsManager", "udfm");
 }
Esempio n. 28
0
        private static void RegisterPredefinedFormatFactories(
            ILogProviderFactoryRegistry logProviderFactoryRegistry,
            ITempFilesManager tempFilesManager,
            IUserDefinedFormatsManager userDefinedFormatsManager)
        {
#if WIN
            logProviderFactoryRegistry.Register(new DebugOutput.Factory());
            logProviderFactoryRegistry.Register(new WindowsEventLog.Factory());
#endif
            logProviderFactoryRegistry.Register(new PlainText.Factory(tempFilesManager));
            logProviderFactoryRegistry.Register(new XmlFormat.NativeXMLFormatFactory(tempFilesManager));
            userDefinedFormatsManager.ReloadFactories();
        }
Esempio n. 29
0
 public CorrelatorPostprocessorControlHandler(
     ICorrelationManager correlationManager,
     ITempFilesManager tempFilesManager,
     IShellOpen shellOpen
     )
 {
     this.correlationManager = correlationManager;
     this.tempFilesManager   = tempFilesManager;
     this.shellOpen          = shellOpen;
     this.getControlData     = Selectors.Create(
         () => correlationManager.StateSummary,
         GetCurrentData
         );
 }
 public LogSourcePostprocessorControlHandler(
     IManager postprocessorsManager,
     PostprocessorKind postprocessorKind,
     Func <IPostprocessorOutputForm> lazyOutputForm,
     LogJoint.UI.Presenters.IShellOpen shellOpen,
     ITempFilesManager tempFiles
     )
 {
     this.postprocessorsManager = postprocessorsManager;
     this.postprocessorKind     = postprocessorKind;
     this.lazyOutputForm        = lazyOutputForm;
     this.shellOpen             = shellOpen;
     this.tempFiles             = tempFiles;
 }