Skip to content

Conversation

@PranavSenthilnathan
Copy link
Member

Add documentation for new API introduced in dotnet/runtime#109861

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization

@tarekgh tarekgh added this to the Backlog milestone Dec 3, 2024
@learn-build-service-prod

This comment was marked as outdated.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 15a5d3b:

⚠️ Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareInfo.xml ⚠️Warning View Details
xml/System.Globalization/GlobalizationExtensions.xml ⚠️Warning View Details
xml/System.Globalization/CompareOptions.xml ✅Succeeded View

xml/System.Globalization/CompareInfo.xml

  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: disallowed-html-tag - See documentation] HTML tag 'format' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.

xml/System.Globalization/GlobalizationExtensions.xml

  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Globalization.CompareOptions.NumericOrdering'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@gewarren gewarren marked this pull request as ready for review December 23, 2025 04:16
@gewarren gewarren requested a review from a team as a code owner December 23, 2025 04:16
Copilot AI review requested due to automatic review settings December 23, 2025 04:16
@gewarren gewarren enabled auto-merge (squash) December 23, 2025 04:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation for the new CompareOptions.NumericOrdering API introduced in dotnet/runtime#109861. The changes update several XML documentation files to include references to the new option and clarify when it's valid or invalid for use.

  • Adds the NumericOrdering member documentation to CompareOptions.xml
  • Updates existing CompareOptions member summaries to use consistent phrasing ("A string comparison that..." instead of "Indicates that...")
  • Adds NumericOrdering to parameter documentation lists across CompareInfo and GlobalizationExtensions methods
  • Updates remarks sections to note that NumericOrdering is invalid for indexing methods (like IndexOf, IsPrefix, IsSuffix, LastIndexOf)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
xml/System.Globalization/CompareOptions.xml Adds NumericOrdering member documentation; updates existing member summaries to use consistent style; improves remarks section with present tense
xml/System.Globalization/GlobalizationExtensions.xml Adds NumericOrdering to the GetStringComparer options parameter documentation
xml/System.Globalization/CompareInfo.xml Adds NumericOrdering to Compare, GetSortKey parameter documentation; updates remarks to note NumericOrdering is invalid for indexing methods

</ReturnValue>
<MemberValue>32</MemberValue>
<Docs>
<summary>A string comparison that sorts sequences of digits (Unicode general category "Nd") based on their numeric value. For example, "2" comes before "10". Non-digit characters such as decimal points and minus or plus signs aren't considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="CompareInfo.IndexOf(string, string, CompareOptions)"/> and <see cref="CompareInfo.IsPrefix(string, string, CompareOptions)"/>).</summary>
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

According to the documentation guidelines, sentences should end with a period. The last sentence in this summary is missing a period.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +546 to 565
<Member MemberName="NumericOrdering">
<MemberSignature Language="C#" Value="NumericOrdering" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Globalization.CompareOptions NumericOrdering = int32(32)" />
<MemberSignature Language="DocId" Value="F:System.Globalization.CompareOptions.NumericOrdering" />
<MemberSignature Language="VB.NET" Value="NumericOrdering" />
<MemberSignature Language="F#" Value="NumericOrdering = 32" Usage="System.Globalization.CompareOptions.NumericOrdering" />
<MemberSignature Language="C++ CLI" Value="NumericOrdering" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Globalization.CompareOptions</ReturnType>
</ReturnValue>
<MemberValue>32</MemberValue>
<Docs>
<summary>A string comparison that sorts sequences of digits (Unicode general category "Nd") based on their numeric value. For example, "2" comes before "10". Non-digit characters such as decimal points and minus or plus signs aren't considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="CompareInfo.IndexOf(string, string, CompareOptions)"/> and <see cref="CompareInfo.IsPrefix(string, string, CompareOptions)"/>).</summary>
</Docs>
</Member>
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

The NumericOrdering member is duplicated in this file. It appears both at lines 378-409 and again at lines 546-565. Only one definition should be present. Additionally, the two definitions have inconsistencies in their documentation format and see cref styles.

Suggested change
<Member MemberName="NumericOrdering">
<MemberSignature Language="C#" Value="NumericOrdering" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Globalization.CompareOptions NumericOrdering = int32(32)" />
<MemberSignature Language="DocId" Value="F:System.Globalization.CompareOptions.NumericOrdering" />
<MemberSignature Language="VB.NET" Value="NumericOrdering" />
<MemberSignature Language="F#" Value="NumericOrdering = 32" Usage="System.Globalization.CompareOptions.NumericOrdering" />
<MemberSignature Language="C++ CLI" Value="NumericOrdering" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Globalization.CompareOptions</ReturnType>
</ReturnValue>
<MemberValue>32</MemberValue>
<Docs>
<summary>A string comparison that sorts sequences of digits (Unicode general category "Nd") based on their numeric value. For example, "2" comes before "10". Non-digit characters such as decimal points and minus or plus signs aren't considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="CompareInfo.IndexOf(string, string, CompareOptions)"/> and <see cref="CompareInfo.IsPrefix(string, string, CompareOptions)"/>).</summary>
</Docs>
</Member>

Copilot uses AI. Check for mistakes.
<para>For example, "2" comes before "10". Non-digit characters such as decimal points, minus, and plus signs</para>
<para>are not considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="M:System.Globalization.CompareInfo.IndexOf(System.String,System.String,System.Globalization.CompareOptions)" /> and <see cref="M:System.Globalization.CompareInfo.IsPrefix(System.String,System.String,System.Globalization.CompareOptions)" />).</para>
<para>A string comparison that sorts sequences of digits (Unicode general category "Nd") based on their numeric value.</para>
<para>For example, "2" comes before "10". Non-digit characters such as decimal points, minus, and plus signs aren't considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="M:System.Globalization.CompareInfo.IndexOf(System.String,System.String,System.Globalization.CompareOptions)" /> and <see cref="M:System.Globalization.CompareInfo.IsPrefix(System.String,System.String,System.Globalization.CompareOptions)" />).</para>
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

According to the documentation guidelines, contractions should be used for a conversational tone. The text "aren't" is correct, but this sentence should end with a period.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants