Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 500 Bytes

PH_P004.md

File metadata and controls

9 lines (5 loc) · 500 Bytes

PH_P004 - CancellationToken not Passed Through

Problem

The current method receives a cancellation token that is not passed to the invoked method, although the callee or one of its overloads accept such a token. Cancellation tokens are meaningless if not used accordingly.

Solution

Pass the received cancellation token to the invoked method. If the invoked method must not be canceled (e.g., for logging a failure), pass CancellationToken.None instead to explicitly state the intention.