private void GetCountLogFiles_Test(string eventLogPath) { long countLogFiles = 0; using (EventLogReader reader = EventLogReader.CreateReader(eventLogPath)) { reader.Reset(); if (reader is EventLogLGFReader) { EventLogLGFReader readerLGF = (EventLogLGFReader)reader; while (readerLGF.CurrentFile != null) { reader.NextFile(); countLogFiles += 1; } } else if (reader is EventLogLGDReader) { countLogFiles = 1; } } Assert.NotEqual(0, countLogFiles); }