You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
This diagnostic would be reported if a method M is called without providing a CancellationToken, and either M or one of its overloads has a CancellationToken parameter.
The code fix for this would attempt to fill in the CancellationToken as follows:
⚠️ Separate equivalence keys should be used for the code fix for the case where the updated call still calls the same method, and the case where the updated call is to a different overload of the method.
The text was updated successfully, but these errors were encountered:
❓ How would this work with overloads, will this diagnostic effectively block overloads without a Cancellation token? If that is the case, this is too restrictive. I think calling an overload without a Cancellation should be allowed when there is no CancellationToken available is the scope
❓ How would a default parameter with value CancellationToken.None be handled when there is no other cancellation token available in the scope?
❓ How would this work with overloads, will this diagnostic effectively block overloads without a Cancellation token? If that is the case, this is too restrictive. I think calling an overload without a Cancellation should be allowed when there is no CancellationToken available is the scope
The problem with this is the reason no cancellation token is in scope could be that no one realized it was needed.
❓ How would a default parameter with value CancellationToken.None be handled when there is no other cancellation token available in the scope?
It would be reported as a warning by this diagnostic, and the code fix would treat the fixed code as calling the same method (see the note on equivalence keys in the original post above).
This diagnostic would be reported if a method M is called without providing a
CancellationToken
, and either M or one of its overloads has aCancellationToken
parameter.The code fix for this would attempt to fill in the
CancellationToken
as follows:CancellationToken
(with consideration for context objects as described in New rule proposal: Async methods should have a CancellationToken parameter #32), the innermost visibleCancellationToken
is passed.CancellationToken.None
.The text was updated successfully, but these errors were encountered: