Exemple #1
0
        public static IStreamLogIngestor CreateDefaultStreamIngestor(IStreamIngestorConfiguration streamIngestorConfiguration,
            IContentFilterFactory contentFilterFactory)
        {
            var factory = new SqlServerStreamIngestorFactory();
            return factory.WithDefaultParser()
                .WithContentFilterFactory(new ContentFilterFactory())
                .WithPersisterDaemon(factory.BuildDefaultPersisterDaemon(streamIngestorConfiguration))
                .Build();

            //IPersistenceConfiguration persistenceConfiguration = new PersistenceConfiguration();

            //var eventPersister = new EventPersister(persistenceConfiguration,
            //    new DataExtractor(persistenceConfiguration,
            //        new FingerprintReader(persistenceConfiguration),
            //        new ServerReader(persistenceConfiguration)),
            //    new ErrorDefinitionWriter(persistenceConfiguration),
            //    new TimelineWriter(persistenceConfiguration),
            //    new ErrorMessageWriter(persistenceConfiguration));

            //return new StreamLogIngestor(new EventFilterFactory(),
            //    new DefaultCSharpErrorParser(streamIngestorConfiguration),
            //    new ContentFilterFactory(streamIngestorConfiguration),
            //    new NullEventDiscarder(),
            //    new PersisterDaemon(streamIngestorConfiguration, eventPersister, new NullEventDiscarder()));
        }
Exemple #2
0
        public static IStreamLogIngestor CreateStreamIngestorWithCustomParser(IStreamIngestorConfiguration streamIngestorConfiguration = null,
            IContentFilterFactory contentFilterFactory = null)
        {
            if (streamIngestorConfiguration == null)
                streamIngestorConfiguration = new StreamIngestorConfiguration();

            if (contentFilterFactory == null)
                contentFilterFactory = new ContentFilterFactory();

            var factory = new SqlServerStreamIngestorFactory();
            return factory.WithCustomParser()
                .WithContentFilterFactory(contentFilterFactory)
                .WithPersisterDaemon(factory.BuildDefaultPersisterDaemon(streamIngestorConfiguration))
                .Build();
        }