Include destination type to ResolutionContext #3592
iotalambda
started this conversation in
Ideas
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is likely related to #3363
When using base types as
TDestination
inCreateMap
, e.g.CreateMap(typeof(MyVeryGenericSource<>), typeof(object))
, there seems to be no way to know inConvertUsing
what derived destination type was used inmapper.Map<MyDerivedDestination>(myVeryGenericSource)
. At the moment we cannot, for example, instantiate an object of the exact destination type inConvertUsing
.Example
Proposal
Include the
DestinationType
toResolutionContext
or somewhere where it would be accessible. For example,How does this sound?
Beta Was this translation helpful? Give feedback.
All reactions