JasonBock / InlineMapping

Using the Compiler API for object mapping
MIT License
64 stars 11 forks source link

Handle Mappable Properties #30

Open JasonBock opened 3 years ago

JasonBock commented 3 years ago

If there's a type that has been set to be mappable, and two properties exist between the source and destination that use that type, I should use the MapTo...() method between them, rather than simply setting one equal to another. Or at least give the user a way to configure that behavior.

There's issues with using the mapping method. I can easily fall into a recursive loop: A has a property of type B, B has a property of type C, C has a property of type A, and....I have to figure out a strategy to catch that and decide what to do with that. Keep going? Have a limit? Let the user configure the behavior?