-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Clarify Guid.Variant property documentation #12186
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jkotas <[email protected]>
Co-authored-by: jkotas <[email protected]>
There was a problem hiding this 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 ports documentation improvements from dotnet/runtime that clarify the Guid.Variant property documentation. The changes make it easier for developers to understand what the property returns and how different UUID versions use the variant field.
Key Changes:
- Replaced technical bit-level description with clearer explanation that the property returns all 4 bits unmasked
- Added a concrete UUIDv7 example to illustrate "don't-care" bits
- Updated wording to align with dotnet-api-docs style guide
|
@tannergooding @nohwnd Porting changes from dotnet/runtime#118987 to official docs. Note that the copilot made a minor style change. |
gewarren
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions for consideration.
| <para>This property returns all 4 bits as is. Some users might only care about fewer bits of the variant field and should refer to <see href="https://www.rfc-editor.org/rfc/rfc9562.html">RFC 9562</see> for how to interpret the result.</para> | ||
| <para>For example, UUIDv7 might only want to consider the 2 most significant bits of the field, as the least 2 significant bits are documented as "don't-care".</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <para>This property returns all 4 bits as is. Some users might only care about fewer bits of the variant field and should refer to <see href="https://www.rfc-editor.org/rfc/rfc9562.html">RFC 9562</see> for how to interpret the result.</para> | |
| <para>For example, UUIDv7 might only want to consider the 2 most significant bits of the field, as the least 2 significant bits are documented as "don't-care".</para> | |
| <para>This property returns all 4 bits as-is. If you only care about fewer bits of the variant field, see <see href="https://www.rfc-editor.org/rfc/rfc9562.html">RFC 9562</see> for information on how to interpret the result.</para> | |
| <para>For example, [the UUIDv7 standard](https://uuidv7.org/) might only want to consider the two most significant bits of the field, as the least two significant bits are documented as "don't-care".</para> |
Ports documentation improvements from dotnet/runtime@f05f25b2 that clarify how to interpret the
Guid.Variantproperty value.