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

Feature/accessor inheritance #51

Merged
merged 6 commits into from
Jul 31, 2020
Merged

Conversation

kavics
Copy link
Contributor

@kavics kavics commented Jul 30, 2020

Issue-1

To access a non-public field of an abstract class needs a new constructor on the ObjectAccessor that allows differentiation of the object instance and its type. For example, access to the "_data" field of the Node needs the following lines:

var accessor = new ObjectAccessor(testNode, typeof(Node));
accessor .SetField("_data", testValue);

Issue-2

To access a static member of the inheritance chain, the BindingFlags.FlattenHirerchy flag need be used in reflection calls.

@kavics kavics requested a review from tusmester July 30, 2020 07:18
@tusmester tusmester merged commit 94e61ad into develop Jul 31, 2020
@tusmester tusmester deleted the feature/accessor-inheritance branch July 31, 2020 12:58
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.

2 participants