コード例 #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);
 }
コード例 #2
0
        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();
            };
        }
コード例 #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;
 }
コード例 #4
0
 public PostprocessorsFactory(
     ITempFilesManager tempFiles,
     Postprocessing.IModel postprocessing)
 {
     this.tempFiles      = tempFiles;
     this.postprocessing = postprocessing;
 }
コード例 #5
0
ファイル: WorkspacesManager.cs プロジェクト: cxsun/logjoint
 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)));
 }
コード例 #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;
 }
コード例 #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));
            });
        }
コード例 #8
0
ファイル: Extensions.cs プロジェクト: sabrogden/logjoint
 public static void DeleteIfTemporary(this ITempFilesManager tempFiles, string fileName)
 {
     if (tempFiles.IsTemporaryFile(fileName))
     {
         File.Delete(fileName);
     }
 }
コード例 #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);
        }
コード例 #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;
        }
コード例 #11
0
        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);
            }
        }
コード例 #12
0
ファイル: Extensions.cs プロジェクト: sabrogden/logjoint
        public static string CreateEmptyFile(this ITempFilesManager tempFiles)
        {
            string fname = tempFiles.GenerateNewName();

            File.Create(fname).Close();
            return(fname);
        }
コード例 #13
0
 public Model(ITempFilesManager tempFiles,
              ILogPartTokenFactories logPartTokenFactories, ISameNodeDetectionTokenFactories nodeDetectionTokenFactories)
 {
     this.tempFiles                   = tempFiles;
     this.logPartTokenFactories       = logPartTokenFactories;
     this.nodeDetectionTokenFactories = nodeDetectionTokenFactories;
 }
コード例 #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());
            };
        }
コード例 #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();
        }
コード例 #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);
        }
コード例 #17
0
        static string GetTempInstallationDir(string installationDir, ITempFilesManager tempFiles)
        {
            string tempInstallationDir = Path.Combine(
                tempFiles.GenerateNewName(),
                "pending-logjoint-update");

            return(tempInstallationDir);
        }
コード例 #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);
        }
コード例 #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;
 }
コード例 #20
0
ファイル: Model.cs プロジェクト: pnelson786/logjoint
 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;
 }
コード例 #21
0
ファイル: AppInitializer.cs プロジェクト: pnelson786/logjoint
 public AppInitializer(
     LJTraceSource tracer,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     ILogProviderFactoryRegistry factoryRegistry,
     ITempFilesManager tempFiles)
 {
     InitializePlatform(tracer);
     InitLogFactories(userDefinedFormatsManager, factoryRegistry, tempFiles);
     userDefinedFormatsManager.ReloadFactories();
 }
コード例 #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;
 }
コード例 #23
0
 public CorrelatorPostprocessorControlHandler(
     IPostprocessorsManager postprocessorsManager,
     ITempFilesManager tempFilesManager,
     IShellOpen shellOpen
     )
 {
     this.postprocessorsManager = postprocessorsManager;
     this.tempFilesManager      = tempFilesManager;
     this.postprocessorId       = PostprocessorIds.Correlator;
     this.shellOpen             = shellOpen;
 }
コード例 #24
0
ファイル: AppInitializer.cs プロジェクト: pnelson786/logjoint
 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));
 }
コード例 #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))
 {
 }
コード例 #26
0
 public TestParsing(
     IAlertPopup alerts,
     ITempFilesManager tempFilesManager,
     ITraceSourceFactory traceSourceFactory,
     IFactory objectsFactory
     )
 {
     this.alerts             = alerts;
     this.tempFilesManager   = tempFilesManager;
     this.traceSourceFactory = traceSourceFactory;
     this.objectsFactory     = objectsFactory;
 }
コード例 #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");
 }
コード例 #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();
        }
コード例 #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
         );
 }
コード例 #30
0
 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;
 }