You need to perform a code review of a small task queue component.
Context: an internal service collects a list of task identifiers for execution and returns a brief run summary. According to the requirements:
null, empty strings, and strings consisting only of spaces must not be processed;Accepted field is the number of реально started unique tasks;Skipped field is the number of input elements from the accepted set that were not started;dotnet run mode on .NET 8.What needs to be done:
QueueProcessor.EnqueueAsync(IEnumerable<string?>, CancellationToken).Assumptions and restrictions:
_started log;Trim();Skipped is counted based on the snapshot of the input taken at the start of the call.C# 12, .NET 8.0.204 SDK, run with dotnet run or dotnet test after adding tests manually. Dependencies are only from the BCL, no external NuGet packages are used.
Use line comments to explain the problem, its impact, the fix and how to test it.