Replies: 2 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Could DefaultContext not just leave the property null and skip the invalid op? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Apologies as this is a straight duplicate of #3206 which appeared to reach consensus that something is not quite right however nothing has changed to rectify that.
Whenever one makes use of ResolutionContext.Items there is a chance that the getter could throw InvalidOperationException depending on how Mapper.Map was called (with or without options action).
If there was a property on ResolutionContext that indicated that the instance was the default instance there would be a nice way to handle this e.g. in a IValueResolver so that Mapper.Map could be called both with and without the options action (without having to catch the exception and carry on).
Source/destination types
Mapping configuration
Version:
9+
Beta Was this translation helpful? Give feedback.
All reactions