From 98bce24412080cbc384ad0105a5b15ab5955f7a9 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Tue, 7 Dec 2021 12:50:24 -1000 Subject: [PATCH] Update MonitorLoop.cs (#24224) --- .../6.0/BackgroundTasksSample/Services/MonitorLoop.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aspnetcore/fundamentals/host/hosted-services/samples/6.0/BackgroundTasksSample/Services/MonitorLoop.cs b/aspnetcore/fundamentals/host/hosted-services/samples/6.0/BackgroundTasksSample/Services/MonitorLoop.cs index dc3b57647b..2404d9c852 100644 --- a/aspnetcore/fundamentals/host/hosted-services/samples/6.0/BackgroundTasksSample/Services/MonitorLoop.cs +++ b/aspnetcore/fundamentals/host/hosted-services/samples/6.0/BackgroundTasksSample/Services/MonitorLoop.cs @@ -7,8 +7,8 @@ namespace BackgroundTasksSample.Services private readonly ILogger _logger; private readonly CancellationToken _cancellationToken; - public MonitorLoop(IBackgroundTaskQueue taskQueue, - ILogger logger, + public MonitorLoop(IBackgroundTaskQueue taskQueue, + ILogger logger, IHostApplicationLifetime applicationLifetime) { _taskQueue = taskQueue; @@ -61,7 +61,8 @@ namespace BackgroundTasksSample.Services delayLoop++; - _logger.LogInformation("Queued Background Task {Guid} is running. " + "{DelayLoop}/3", guid, delayLoop); + _logger.LogInformation("Queued Background Task {Guid} is running. " + + "{DelayLoop}/3", guid, delayLoop); } if (delayLoop == 3)