Closed undiwahn closed 6 years ago
Did we want to be able to declare a set of Default includes with the ExpandFrom attribute? Does seem like this could create conflicts with the default include attribute.
I think the idea was that it would replace the manual Map<> call entirely. Since you can optionally provide an include list to the Map<> call, you should be able to optionally provide an include list to the attribute.
On Oct 29, 2017 6:56 PM, "alexbarbato" notifications@github.com wrote:
Did we want to be able to declare a set of Default includes with the ExpandFrom attribute? Does seem like this could create conflicts with the default include attribute.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SkywardApps/popcorn/issues/33#issuecomment-340310064, or mute the thread https://github.com/notifications/unsubscribe-auth/AJNm3pIZeZKRsXFjyb-A0qEDJI7SrTrBks5sxQKigaJpZM4QIO_7 .
( and you are correct about the conflict; it's the same as between the Map<> call and the DefaultInclude attribute. So it should also throw an exception if you try to provide both )
On Oct 29, 2017 7:01 PM, "Nick Elliott" nelliott@skywardapps.com wrote:
I think the idea was that it would replace the manual Map<> call entirely. Since you can optionally provide an include list to the Map<> call, you should be able to optionally provide an include list to the attribute.
On Oct 29, 2017 6:56 PM, "alexbarbato" notifications@github.com wrote:
Did we want to be able to declare a set of Default includes with the ExpandFrom attribute? Does seem like this could create conflicts with the default include attribute.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SkywardApps/popcorn/issues/33#issuecomment-340310064, or mute the thread https://github.com/notifications/unsubscribe-auth/AJNm3pIZeZKRsXFjyb-A0qEDJI7SrTrBks5sxQKigaJpZM4QIO_7 .
Closed with PR #36
We get a lot of mapping boilerplate lines when using simple maps that don't require much customization.
eg
Ideally, we want an attribute that you can apply that designates something as the target of a mapping. So for example:
This means that we need a new method on PopcornConfiguration called something like 'ScanAssemblyForMapping' that will look for all class types within an assembly that have the [ExpandFrom] attribute applied, and automatically register them.