Example #1
0
 public LogProcessor(W3CLogReaderFactory readerFactory, LogFetcher logFetcher, StateRecorder stateRecorder,
                     LogPersisterFactory persisterFactory, Logger logger)
 {
     _readerFactory = readerFactory;
     _logFetcher = logFetcher;
     _stateRecorder = stateRecorder;
     _persisterFactory = persisterFactory;
     _logger = logger;
 }
        public void Setup()
        {
            config = new Configuration();
            ;
            source = new Configuration.source();
            source.aliases.Add(new Configuration.source.elementAlias {alias = "theAlias", elementName = "theelemtnname"});
            source.conversions.Add(new Configuration.source.conversion {elementName = "LogTime", type = "DateTime"});
            source.composites.Add(new Configuration.source.composite
                                      {elementName = "LogTime", elements = new[] {"date", "time"}});
            source.multiColumnElements.Add(new Configuration.source.mulitColumnElement
                                               {elementName = "Endtime-UTC", colSpan = 2});
            source.staticElements.Add(new Configuration.source.staticElement
                                          {elementName = "MyName", elementValue = "Dillon"});
            source.drop.Add("el1");
            source.drop.Add("el2");
            source.entryLimit = 100;

            config.sources.Add(source);

            cl = new W3CLogReaderFactory(Substitute.For<Logger>());
        }