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

Add PropertyBuilder implementation #95303

Merged
merged 2 commits into from Nov 30, 2023
Merged

Add PropertyBuilder implementation #95303

merged 2 commits into from Nov 30, 2023

Conversation

buyaa-n
Copy link
Member

@buyaa-n buyaa-n commented Nov 28, 2023

Add PropertyBuilder implementation for new persist able reflection emit implementation.

Contributes to #92975

@ghost
Copy link

ghost commented Nov 28, 2023

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

Issue Details

Add PropertyBuilder implementation for new persist able reflection emit implementation.

Contributes to #92975

Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

Copy link
Member

@steveharter steveharter left a comment

Choose a reason for hiding this comment

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

LGTM; some misc nits\questions.


if (property._otherMethods != null)
{
foreach (MethodBuilderImpl method in property._otherMethods)
Copy link
Member

Choose a reason for hiding this comment

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

Do we have tests for other property methods? IL-only tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have only this:

// Not sure how other methods should have loaded/tested
// 'propertyFromDisk.GetAccessors(true)' did not return other method
Assert.NotNull(typeFromDisk.GetMethod("OtherMethod", BindingFlags.NonPublic | BindingFlags.Instance));

In the generated assembly it was added just like a normal method, was not sure what else to verify

Copy link
Member

Choose a reason for hiding this comment

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

I assume this was for ".other" methods which are different than ".get" and ".set" (ECMA allows methods other than get\set)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is the "other" method

@buyaa-n
Copy link
Member Author

buyaa-n commented Nov 30, 2023

The failures unrelated and known

@buyaa-n buyaa-n merged commit 2a6bd3a into dotnet:main Nov 30, 2023
105 of 111 checks passed
@buyaa-n buyaa-n deleted the property_impl branch November 30, 2023 23:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants