Mapping private and protected members. #529
-
Dear all, I recently came across Mapperly through Nick Chapsas' YouTube channel, and I must say the library looks incredibly promising. As I explore its features for my project, I have a specific requirement related to mapping private and protected class members. I understand that Mapperly utilizes code generation rather than reflection. Given this approach, I'm curious to know if it's currently possible to map private and protected class members using the library. If so, could you please provide some guidance on how to achieve this? I look forward to your response. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, thanks for your question. I think I saw the same video 😃 Unfortunately because mapperly doesn't use reflection in its generated code it cannot access or change private fields. Perhaps in the future this feature could be added, i.e. when It's an interesting idea, free to make an issue. |
Beta Was this translation helpful? Give feedback.
Hey, thanks for your question. I think I saw the same video 😃
Unfortunately because mapperly doesn't use reflection in its generated code it cannot access or change private fields. Perhaps in the future this feature could be added, i.e. when
[MapPrivateMembers]
is enabled mapperly could generate expression trees to get and set inaccessible fields.It's an interesting idea, free to make an issue.