Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TagName docs to include behavior if tag is not found #109934

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

mpdelbuono
Copy link
Contributor

Adds detail to the documentation of TagName.IndexOf to clarify that the method will return -1 if the specified tag was not found.

(No behavior change; this is a documentation change only.)

Adds documentation to TagList.IndexOf that states the behavior when the key was not found.
Adds documentation to TagList.IndexOf that states the behavior when the key was not found.
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 18, 2024
@mpdelbuono
Copy link
Contributor Author

@dotnet-policy-service agree company="Microsoft"

@ericstj
Copy link
Member

ericstj commented Dec 17, 2024

For reference, existing docs are here: https://github.com/dotnet/dotnet-api-docs/blob/46669e697cfde9887769092e3bc42d1fcc475586/xml/System.Diagnostics/TagList.xml#L446 and they do mention a bit more detail, but not the -1 case.

I think we'll need to port the changes made here to the api-docs, unless we enable UseCompilerGeneratedDocXmlFile.

I wonder if there are other IndexOf docs that could use similar detail?

@ericstj ericstj added the documentation Documentation bug or enhancement, does not impact product or test code label Dec 17, 2024
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, until this assembly is marked to use the compiler generated XML file, this change won't automatically be reflected in online docs.

@tarekgh
Copy link
Member

tarekgh commented Dec 17, 2024

/ba-g the iOS failure is not related. CC @matouskozak if want to look.

@tarekgh
Copy link
Member

tarekgh commented Dec 17, 2024

@mpdelbuono thanks for submitting this PR. Is it possible you can help submit a PR to port it to the public docs? basically, you need to change the following file:

https://github.com/dotnet/dotnet-api-docs/blob/46669e697cfde9887769092e3bc42d1fcc475586/xml/System.Diagnostics/TagList.xml#L446

@tarekgh tarekgh merged commit e654570 into dotnet:main Dec 17, 2024
79 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Diagnostics.Metric community-contribution Indicates that the PR has been added by a community member documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants