Skip to content

[INCOMPLETE!] Getting non-public static property#27

Open
tpluscode wants to merge 2 commits intoekonbenefits:masterfrom
tpluscode:internal-static
Open

[INCOMPLETE!] Getting non-public static property#27
tpluscode wants to merge 2 commits intoekonbenefits:masterfrom
tpluscode:internal-static

Conversation

@tpluscode
Copy link

This PR kind of fixes #26

It demonstrates what I attempted to fix InvokeGet of private static properties (or public property of a non-public type).

catch (RuntimeBinderException)
{

}
Copy link
Author

Choose a reason for hiding this comment

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

Removing this try..catch causes all test cases to fail but I do not understand why


tBinderType = typeof (InvokeMemberBinder);
tKnownType = KnownMember;
}
Copy link
Author

Choose a reason for hiding this comment

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

This binder only works for public type. The else only works for private type when a property is set-first...

@jbtule
Copy link
Member

jbtule commented Sep 10, 2018

This is really interesting... I'm on paternity leave right now, but I'll hopefully soon get a chance to look at this too.

@tpluscode
Copy link
Author

Have you had a chance to look at this @jbtule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InvokeGet with static context fails

2 participants