From c762b754e70b9cd21ad8cea2ad9061b743c33bfd Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Tue, 10 Sep 2024 03:15:53 +0100 Subject: [PATCH] Add [DebuggerDisplay] to CancellationTokenSource (#105764) * Add [DebuggerDisplay] to CancellationTokenSource Add `[DebuggerDisplay]` to `CancellationTokenSource` to show whether cancelled or disposed. Relates to #105698. * Update src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs --------- Co-authored-by: Stephen Toub --- .../src/System/Threading/CancellationTokenSource.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs index 26c2eb7078598..7ea36b67c970b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs @@ -22,6 +22,7 @@ namespace System.Threading /// concurrently from multiple threads. /// /// + [DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}")] public class CancellationTokenSource : IDisposable { /// A that's already canceled.