diff --git a/src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapService.cs b/src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapService.cs index c7250e8845..305719d092 100644 --- a/src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapService.cs +++ b/src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapService.cs @@ -111,7 +111,7 @@ public bool PrintHeap(IEnumerable objects, DisplayKind displayKind, b // Also, don't report fragmentation for Large/Pinned/Frozen segments. This check // is a little slow, so we do this last. ClrSegment seg = obj.Type.Heap.GetSegmentByAddress(obj); - if (seg is not null && seg.Kind is not GCSegmentKind.Large or GCSegmentKind.Pinned or GCSegmentKind.Frozen) + if (seg is not null && seg.Kind is not (GCSegmentKind.Large or GCSegmentKind.Pinned or GCSegmentKind.Frozen)) { fragmentation ??= new(); fragmentation.Add((lastFreeObject, obj)); diff --git a/src/Microsoft.Diagnostics.ExtensionCommands/FindEphemeralReferencesToLOHCommand.cs b/src/Microsoft.Diagnostics.ExtensionCommands/FindEphemeralReferencesToLOHCommand.cs index 221c06f502..0dd4ca6bbb 100644 --- a/src/Microsoft.Diagnostics.ExtensionCommands/FindEphemeralReferencesToLOHCommand.cs +++ b/src/Microsoft.Diagnostics.ExtensionCommands/FindEphemeralReferencesToLOHCommand.cs @@ -19,7 +19,7 @@ public class FindEphemeralReferencesToLOHCommand : ClrRuntimeCommandBase public override void Invoke() { - int segments = Runtime.Heap.Segments.Count(seg => seg.Kind is not GCSegmentKind.Frozen or GCSegmentKind.Pinned); + int segments = Runtime.Heap.Segments.Count(seg => seg.Kind is not (GCSegmentKind.Frozen or GCSegmentKind.Pinned)); if (segments > 50) { string gcSegKind = Runtime.Heap.SubHeaps[0].HasRegions ? "regions" : "segments"; @@ -121,7 +121,7 @@ public override void Invoke() // This handles both regions and segments Generation gen = seg.GetGeneration(obj); - if (gen is not Generation.Generation0 or Generation.Generation1) + if (gen is not (Generation.Generation0 or Generation.Generation1)) { continue; }