Skip to content

Check for empty context #4125

Locked Answered by lbargaoanu
kakone asked this question in Q&A
Oct 28, 2022 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

If you need the context, you're supposed to call a Map overload with options. But yes, there is no way to call without options and then check without throwing. I suggest that you simply pay for the extra allocations and always call with options. Or use some other way to pass state, with IncludeMembers, in the source or destination object or through DI.
I'd rather not add a flag for the sole purpose of telling you there is no context.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by lbargaoanu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@almightyju
Comment options

@lbargaoanu
Comment options

@almightyju
Comment options

@lbargaoanu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4124 on October 28, 2022 11:34.