-
Notifications
You must be signed in to change notification settings - Fork 2.4k
WIP ForCtorParam MapFrom any expression #3160
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
Conversation
- Added code to TypeMapFactory+ConstructorMap to check for valid ForCtorParam entries to match against a Constructor #3159
I'm not sure this is the right approach. It seems better to try and move the MapDestinationCtorToSource code in MappingExpressionBase.Configure where the configuration is available. |
Thanks for the feedback.
Unfortunately, my first thought was to look at the Configure method, but
the Configure tree doesn't get called until after the TypeMapFactory has
chosen the (sometimes incorrect) constructor to map to.
The ForCtorParam mappings have to be checked during that phase somehow, and
running the whole Configure tree early also doesn't work because that needs
to do things later in the process.
So, while I agree that this isn't the perfect approach, I can't see another
obvious route.
…On Tue, 9 Jul 2019, 04:08 Lucian Bargaoanu, ***@***.***> wrote:
I'm not sure this is the right approach. It seems better to try and move
the MapDestinationCtorToSource code in MappingExpressionBase.Configure
where the configuration is available.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3160>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIEDQLDIBUHY62CKRWK6C3P6P6J7ANCNFSM4H64ZJWQ>
.
|
What I'm saying is that the code that chooses the constructor should be in Configure. |
Okay, I'll have a look at how that sits today and get back to you.
…On Tue, 9 Jul 2019, 07:50 Lucian Bargaoanu, ***@***.***> wrote:
What I'm saying is that the code that chooses the constructor should be in
Configure.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3160>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIEDQLQNWNSHE7BCGQZZ7LP6QYLVANCNFSM4H64ZJWQ>
.
|
… from TypeMapFactory to MappingExpressionBase.Configure.
Closing as stale. But feel free to open a new one when it's ready. |
@lbargaoanu - the update I put up 2 weeks ago was that "I believe it is ready" state - I thought you adding the milestone was an implicit acceptance. |
This PR is not even ready for review. |
Not sure what happened - it went through all the checks and passed... Have created #3169 as a second attempt. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #3159.