public void Search() { using (var reader = new NAppIndexReader(new ConfigManager())) { reader.Search(); } }
public void ExceptionWhenFromOrToNotSet() { using (var reader = new NAppIndexReader(new ConfigManager())) { var qry = new LogQuery(); Assert.Throws<ArgumentException>(() => reader.Search(qry)); } }
public JobProcessor(ConfigManager config, Database currentDb, JobQueueManager manager, NAppIndexUpdater indexUpdater, NAppIndexReader indexReader) { this.currentDb = currentDb; this.manager = manager; this.indexReader = indexReader; this.indexUpdater = indexUpdater; if (!int.TryParse(config.GetSetting(SettingKeys.Manager_ProcessorQueueSize), out this.processorQueueSize)) { this.processorQueueSize = 64; } InitializeLists(); }
public void SearchForElapsedGreaterThan500() { using (var reader = new NAppIndexReader(new ConfigManager())) { var qry = new LogQuery() { DateTime_From = new DateTime(2011, 11, 03), DateTime_To = new DateTime(2011, 11, 06), TotalElapsed_From = TimeSpan.FromTicks(500), }; var ret = reader.Search(qry); Assert.That(ret, Is.Not.Null); } }
public void SearchInTimeRange() { using (var reader = new NAppIndexReader(new ConfigManager())) { var qry = new LogQuery() { DateTime_From = new DateTime(2011, 11, 03), DateTime_To = new DateTime(2011, 11, 06), }; var ret = reader.Search(qry); Assert.That(ret, Is.Not.Null); Assert.That(ret.DateTime_From, Is.EqualTo(qry.DateTime_From)); Assert.That(ret.DateTime_To, Is.EqualTo(qry.DateTime_To)); } }
public Job(ConfigManager config, JobQueueManager manager, bool IsDatabaseTask, bool traceEnabled) { this.config = config; this.manager = manager; if (IsDatabaseTask) { currentDb = new Database(config); currentDb.InitializeDatabase(); indexUpdater = new NAppIndexUpdater(config, currentDb); indexUpdater.Initialize(); } indexReader = new NAppIndexReader(config); this.traceEnabled = traceEnabled; }