Skip to content

Support encoding TypedReferences in signatures.#85360

Merged
buyaa-n merged 4 commits intodotnet:mainfrom
teo-tsirpanis:srm-typedref
May 1, 2023
Merged

Support encoding TypedReferences in signatures.#85360
buyaa-n merged 4 commits intodotnet:mainfrom
teo-tsirpanis:srm-typedref

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.
@ghost
Copy link

ghost commented Apr 25, 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.

@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
Contributor

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
Contributor

@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
@jcouv jcouv moved this from Misc to Active/Investigating in Compiler: Julien's umbrellas Nov 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[API Proposal]: SignatureTypeEncoder.TypedReference()

3 participants