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

Support encoding TypedReferences in signatures. #85360

Merged
merged 4 commits into from
May 1, 2023

Conversation

teo-tsirpanis
Copy link
Contributor

This PR does two things. It adds a SignatureTypeEncoder.TypedReference() method and updates the SignatureTypeEncoder.PrimitiveType method to accept values of PrimitiveTypeCode.TypedReference. Any of the two ways allows encoding a typed reference with System.Reflection.Metadata.

Fixes #80812. Tests were updated.

Since we have a dedicated method for typed references, there is no reason to prohibit it.
@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, 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 added the community-contribution Indicates that the PR has been added by a community member label Apr 25, 2023
@ghost
Copy link

ghost commented Apr 25, 2023

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

Issue Details

This PR does two things. It adds a SignatureTypeEncoder.TypedReference() method and updates the SignatureTypeEncoder.PrimitiveType method to accept values of PrimitiveTypeCode.TypedReference. Any of the two ways allows encoding a typed reference with System.Reflection.Metadata.

Fixes #80812. Tests were updated.

Author: teo-tsirpanis
Assignees: -
Labels:

area-System.Reflection.Metadata, new-api-needs-documentation

Milestone: -

@buyaa-n
Copy link
Member

buyaa-n commented May 1, 2023

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, 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.

@teo-tsirpanis please add doc with triple slash comment for the, even all other similar APIs have not documented we should keep documenting the new ones at least. Other than that the PR looks good to me, thank you!

@teo-tsirpanis
Copy link
Contributor Author

Done @buyaa-n, I documented the entire SignatureTypeEncoder and reworded some of the existing documentation.

…/Metadata/Ecma335/Encoding/BlobEncoders.cs

Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
Copy link
Member

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

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

LGTM, thanks you @teo-tsirpanis

@buyaa-n buyaa-n merged commit 7a87fc1 into dotnet:main May 1, 2023
@teo-tsirpanis teo-tsirpanis deleted the srm-typedref branch May 1, 2023 22:27
@ghost ghost locked as resolved and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

Successfully merging this pull request may close these issues.

[API Proposal]: SignatureTypeEncoder.TypedReference()
3 participants