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

Expose missing BinaryPrimitives APIs #82310

Merged
merged 3 commits into from
Feb 21, 2023
Merged

Conversation

tannergooding
Copy link
Member

This resolves #72107

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost ghost assigned tannergooding Feb 17, 2023
@ghost
Copy link

ghost commented Feb 17, 2023

Tagging subscribers to this area: @dotnet/area-system-buffers
See info in area-owners.md if you want to be subscribed.

Issue Details

This resolves #72107

Author: tannergooding
Assignees: -
Labels:

area-System.Buffers, new-api-needs-documentation

Milestone: -

@stephentoub
Copy link
Member

Is there anywhere we should be using these?

@tannergooding
Copy link
Member Author

I'm not aware of any places where we're using Int128/UInt128 ourselves yet.

Looks like we can switch to using IntPtr/UIntPtr in EventPipe. I didn't transitively look at other calls (BinaryReader.ReadInt64 or XmlBinaryReader.GetInt64), however.

@tannergooding
Copy link
Member Author

Fixed the docs and updated relevant places to use the new BinaryPrimitives APIs where applicable.

@tannergooding
Copy link
Member Author

Failure is #82055, this can be merged once it gets sign-off.

Copy link
Contributor

@dakersnar dakersnar left a comment

Choose a reason for hiding this comment

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

LGTM. Any specific logic in the tests that could use a deeper pass? Also, will we want these APIs on the new Decimal types?

@tannergooding
Copy link
Member Author

tannergooding commented Feb 21, 2023

Any specific logic in the tests that could use a deeper pass?

None come to mind. These are relatively straightforward APIs.

Also, will we want these APIs on the new Decimal types?

Probably not without explicit user ask. Users can achieve the same thing by reading the raw bits and calling DecodeDecimal/DecodeBinary (there is also a layering issue with regards to BinaryPrimitives being in corelib).

@tannergooding tannergooding merged commit 2819a94 into dotnet:main Feb 21, 2023
@tannergooding tannergooding deleted the fix-72107 branch February 21, 2023 20:35
@jeffhandley jeffhandley added the blog-candidate Completed PRs that are candidate topics for blog post coverage label Mar 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Buffers blog-candidate Completed PRs that are candidate topics for blog post coverage new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal] Expose missing BinaryPrimitives APIs
4 participants