Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.Net Taskはタスクのキャンセルをサポートしていますが、キャンセルの理由を伝えたいと思います。私の状況では、タスクは何らかの理由でキャンセルされ、タスクはキャンセルの理由ごとに異なる方法で終了する必要があります。
CancellationTokenSourceクラスには、その理由を設定するためのプロパティがありません。キャンセル理由をタスクに渡す方法は?