Esempio n. 1
0
    public List <LogEntry> GetLog(bool includeInformation = false, bool includeWarnings = false, bool includeErrors = false, int takeCount = 1000)
    {
        var filter = new LogEntryFilter
        {
            IncludeInformation = includeInformation,
            IncludeWarnings    = includeWarnings,
            IncludeErrors      = includeErrors,
            TakeCount          = takeCount
        };

        return(_logService.GetEntries(filter));
    }
Esempio n. 2
0
        public void TestMethod()
        {
            // Arrange
            string         pattern         = @"from: ";
            List <string>  filteredEntries = new List <string>();
            LogEntryFilter filter          = new LogEntryFilter(pattern, (message) =>
            {
                filteredEntries.Add(message);
            });

            // Act
            foreach (string entry in TestData.ISsLogEntries)
            {
                filter.process(entry);
            }

            // Assert
            Assert.AreEqual(4, filteredEntries.Count);
        }