Detecting if a type map is registered #3603
replaysMike
started this conversation in
NA
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems there are a few entry points to get type maps for a specified type pair, such as:
However it returns null for variants of the type pair, such as arrays/collections/dictionaries etc. There must be some internal handling done before calling these methods since it can definitely map the types, and it's not exposed by the api. Is there any other way to determine if Automapper will map a type besides catching mapping exceptions during a call to
.Map<Type>()
?The reason why isn't really the question here, but more as to if it can be done.
Beta Was this translation helpful? Give feedback.
All reactions