Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed accessing partially overriden properties from Python#1650

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lostmsu merged 1 commit intopythonnet:masterfromlosttech:bugs/OverridenProperty
Jan 4, 2022

Conversation

lostmsu
Copy link
Member

What does this implement/fix? Explain your changes.

.NETPropertyInfo.GetMethod would not return base non-overridden accessor for a partially overridden property (e.g. only setter overridden)

Because of that when constructingPropertyObject we scan base classes to find base accessor (if any).

Does this close any currently open issues?

fixes#1455

Any other comments?

This might have performance implications due to replacement ofPropertyInfo.GetValue withgetter.Invoke (not tested)

Also in the change

No need to serialize accessors - they can be reconstructed from thePropertyInfo

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change

@lostmsulostmsuforce-pushed thebugs/OverridenProperty branch 2 times, most recently froma41a153 to84102cdCompareDecember 29, 2021 04:14
…etMethod would not return base non-overriden accessor for a partially overriden propertybecause of that when constructing PropertyObject we scan base classes to find base accessor (if any)this might have performance implications due to replacement of PropertyInfo.GetValue with getter.Invoke (not tested)fixespythonnet#1455
@lostmsulostmsu merged commitfc31de1 intopythonnet:masterJan 4, 2022
@lostmsulostmsu deleted the bugs/OverridenProperty branchJanuary 4, 2022 16:42
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

.NET property not accessible in derived classes where only the setter or the getter has been overridden
1 participant
@lostmsu

[8]ページ先頭

©2009-2025 Movatter.jp