Skip to content

Commit 6428259

Browse files
Apply suggestions from code review
Co-authored-by: Stephen Halter <[email protected]>
1 parent 387e8fe commit 6428259

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/EverythingServer/LoggingUpdateMessageSender.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace EverythingServer;
88

9-
public class LoggingUpdateMessageSender(IMcpServer server, Func<LoggingLevel> currentLevel) : BackgroundService
9+
public class LoggingUpdateMessageSender(IMcpServer server, Func<LoggingLevel> getMinLevel) : BackgroundService
1010
{
1111
readonly Dictionary<LoggingLevel, string> _loggingLevelMap = new()
1212
{
@@ -32,7 +32,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
3232
Data = _loggingLevelMap[newLevel],
3333
};
3434

35-
if (newLevel > currentLevel())
35+
if (newLevel > getMinLevel())
3636
{
3737
await server.SendNotificationAsync("notifications/message", message, cancellationToken: stoppingToken);
3838
}

0 commit comments

Comments
 (0)