[OPTIMIZING]

This commit is contained in:
max
2025-09-10 02:55:06 +02:00
parent 03631cd0c8
commit ef6ca0ee07
4 changed files with 8 additions and 14 deletions

View File

@@ -60,7 +60,7 @@ public abstract class ExtendedBackgroundService : BackgroundService
}
}
protected void LogEvent(string message, LogSeverity severity = LogSeverity.Info) => ProgressEvents.Add(new ServiceEvent(Name, message, DateTime.UtcNow, severity));
protected void LogEvent(string message, LogSeverity severity = LogSeverity.Info) => ProgressEvents.Add(new ServiceEvent(string.Intern(Name), message, DateTime.UtcNow, severity));
public void Pause()
{
@@ -103,4 +103,4 @@ public enum ServiceState
Paused
}
public record ServiceEvent(string Source, string Message, DateTime Date, LogSeverity Severity);
public record struct ServiceEvent(string Source, string Message, DateTime Date, LogSeverity Severity);