From e65457031da52f57d03da721f381a82a5be64c03 Mon Sep 17 00:00:00 2001 From: "Matthew P. Del Buono" Date: Tue, 17 Dec 2024 12:01:35 -0800 Subject: [PATCH] Update TagName docs to include behavior if tag is not found (#109934) * Clarify documentation for TagList.IndexOf Adds documentation to TagList.IndexOf that states the behavior when the key was not found. * Clarify documentation for TagList.IndexOf Adds documentation to TagList.IndexOf that states the behavior when the key was not found. --- .../src/System/Diagnostics/Metrics/TagList.netcore.cs | 1 + .../src/System/Diagnostics/Metrics/TagList.netfx.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netcore.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netcore.cs index cd070ebdd31a5..325a0ee380c75 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netcore.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netcore.cs @@ -266,6 +266,7 @@ public bool Remove(KeyValuePair item) /// Searches for the specified tag and returns the zero-based index of the first occurrence within the entire . /// /// The tag to locate in the . + /// The zero-based index of the first occurrence within the , or -1 if there is no such tag. public readonly int IndexOf(KeyValuePair item) { ReadOnlySpan> tags = diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netfx.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netfx.cs index f003241ceb40a..4714348bd82a6 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netfx.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.netfx.cs @@ -416,6 +416,7 @@ public bool Remove(KeyValuePair item) /// Searches for the specified tag and returns the zero-based index of the first occurrence within the entire . /// /// The tag to locate in the . + /// The zero-based index of the first occurrence within the , or -1 if there is no such tag. public readonly int IndexOf(KeyValuePair item) { if (_overflowTags is not null)