30 lines
661 B
C#
30 lines
661 B
C#
/*
|
|
* Author: Nikolay Dvurechensky
|
|
* Site: https://www.dvurechensky.pro/
|
|
* Gmail: dvurechenskysoft@gmail.com
|
|
* Last Updated: 12 мая 2025 03:39:52
|
|
* Version: 1.0.4
|
|
*/
|
|
|
|
namespace Behavioral;
|
|
|
|
public class LogProcessor
|
|
{
|
|
private readonly Func<List<LogEntry>> _logimporter;
|
|
|
|
public LogProcessor(Func<List<LogEntry>> logImporter)
|
|
{
|
|
_logimporter = logImporter;
|
|
}
|
|
|
|
public void ProcessLogs()
|
|
{
|
|
foreach(var logEntry in _logimporter.Invoke())
|
|
{
|
|
Console.WriteLine(logEntry.DateTime);
|
|
Console.WriteLine(logEntry.Severity);
|
|
Console.WriteLine(logEntry.Message);
|
|
}
|
|
}
|
|
}
|