Skip to content

Commit

Permalink
Add [DebuggerDisplay] to CancellationTokenSource (dotnet#105764)
Browse files Browse the repository at this point in the history
* Add [DebuggerDisplay] to CancellationTokenSource

Add `[DebuggerDisplay]` to `CancellationTokenSource` to show whether cancelled or disposed.

Relates to dotnet#105698.

* Update src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
  • Loading branch information
martincostello and stephentoub committed Sep 10, 2024
1 parent b77b71e commit c762b75
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace System.Threading
/// concurrently from multiple threads.
/// </para>
/// </remarks>
[DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}")]
public class CancellationTokenSource : IDisposable
{
/// <summary>A <see cref="CancellationTokenSource"/> that's already canceled.</summary>
Expand Down

0 comments on commit c762b75

Please sign in to comment.