[OPTIMIZING]
This commit is contained in:
@@ -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);
|
Reference in New Issue
Block a user