Skip to content

Commit

Permalink
singleOrPlural
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Feldman <[email protected]>
  • Loading branch information
ErikMogensen and SeanFeldman authored Feb 15, 2024
1 parent 0ab10aa commit 030fb0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ServiceBus/Helpers/CancelScheduledMessagesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public static async Task CancelScheduledMessages(ServiceBusHelper2 serviceBusHel

await Task.WhenAll(tasks);
stopwatch.Stop();
serviceBusHelper.WriteToLog($"Cancelled {sequenceNumbersToCancel.Count} scheduled message(s) in {stopwatch.ElapsedMilliseconds / 1000} seconds.");
Func<string> singleOrPlural = () => sequenceNumbersToCancel.Count() > 1 ? "messages": "message";
serviceBusHelper.WriteToLog($"Cancelled {sequenceNumbersToCancel.Count} scheduled {singleOrPlural()} in {stopwatch.Elapsed}.");
}
finally
{
Expand Down

0 comments on commit 030fb0a

Please sign in to comment.