Reflection.GetProperties #908
garrynewman
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reflection.GetProperties
now returns aPropertyInfo
, so it's like real reflection.Why
I figured instead of wrapping these types, real programmers are going to want to access them directly. This means we don't really have to document how to use them because there's a world of documentation out there - where if we had a wrapped type we would have to document it.
Safety
The original reason to not allow access to PropertyInfo (and memberinfo etc) was so we could moderate access to them. You shouldn't be able to get all the properties of an internal, or dangerous type, and sidestep private/internal access.
So to still enforce this
Reflection.GetProperties
has a few different modes. If the type is defined by an addon you get full access to it. If the type is not addon defined you can only access public members.Exploits
Part of making this announcement is to give everyone a heads up, and let them find and report exploits. Do you see any issues with doing things this way instead of wrapping?
Beta Was this translation helpful? Give feedback.
All reactions