CancellationToken is not the last parameter (CA1068)
هذا المحتوى غير متوفر بلغتك بعد.
Key dotnet.async.cancellationtoken-last · Severity info · Category async
Microsoft analyzer CA1068. Flags a method whose CancellationToken is not its last parameter - the convention callers and analyzers rely on to pass it along.
Incorrect
Section titled “Incorrect”public Task<Order> LoadAsync(CancellationToken ct, int id)Correct
Section titled “Correct”public Task<Order> LoadAsync(int id, CancellationToken ct)