-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Consider member value resolvers and value converters for source valid… #4011
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
9d2dfd9
consider member value resolvers and value converters for source valid…
lbargaoanu 29f1beb
simplify
lbargaoanu 8552e2e
re-enable configuration only tests
lbargaoanu 18c7f73
try to cover all cases
lbargaoanu 704e5ba
cosmetic
lbargaoanu ba60290
polymorphic implementation for type converters
lbargaoanu 7eff43f
remove ConstructDestinationUsingServiceLocator
lbargaoanu 3c2ec11
simplify
lbargaoanu 884e22a
remove TypeMap.AsProxy
lbargaoanu a2c4ba0
remove DestinationTypeToUse
lbargaoanu 42ef755
code reuse
lbargaoanu 821d4fa
add MemberMap.Resolver
lbargaoanu c38b3dc
code reuse
lbargaoanu ed3ac6e
Resolver.GetSourceMember
lbargaoanu 99092f4
ClassValueResolver
lbargaoanu 2fa05d6
FuncResolver
lbargaoanu ce51167
ExpressionResolver
lbargaoanu 8ce0961
remove storage for CustomCtorExpression
lbargaoanu 40cecce
remove storage for TypeMap.CustomMapExpression
lbargaoanu 6cd3631
cosmetic
lbargaoanu 854fa31
implement the convention based resolver in MemberMap
lbargaoanu 1eab5f1
implement CanResolveValue in MemberMap
lbargaoanu 787ae9d
cosmetic
lbargaoanu 9b872ef
remove TypeMap.IsValid
lbargaoanu 63aeef3
DestinationTypeOverride is considered separately
lbargaoanu c366182
cosmetic
lbargaoanu 8d87e4e
MemberMapDetails
lbargaoanu 20e379d
TypeMapDetails
lbargaoanu a1c02c7
cosmetic
lbargaoanu 415c1d4
remove TypeMap._orderedPropertyMaps
lbargaoanu 8b733b1
cosmetic
lbargaoanu 999d65f
reuse the constructor map object
lbargaoanu 79fd635
cosmetic
lbargaoanu 449a50b
remove QueryMapperVisitor
lbargaoanu 5b0cf17
hard code the map based projection mappers
lbargaoanu 6fdc82b
IPojectionMapper.IsMatch(TypePair context)
lbargaoanu ddc934f
cosmetic
lbargaoanu 798ebf2
constructor parameters default values with ProjectTo
lbargaoanu 6024cf3
remove ResolutionContext.Options
lbargaoanu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
remove ResolutionContext.Options
- Loading branch information
commit 6024cf32497a0962bbceb87836678dab29f00ff2
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # 12.0 Upgrade Guide | ||
|
|
||
| [Release notes](https://github.com/AutoMapper/AutoMapper/releases/tag/v12.0.0). | ||
|
|
||
| ## Equivalent settings overwrite each other | ||
|
|
||
| That applies per map and also per member. For example, you can have only one type converter per map and only one resolver per member. | ||
|
|
||
| It might not be obvious that some settings are equivalent. For example, a value converter is a special kind of resolver, so a `ConvertUsing` will overwrite a `MapFrom` | ||
| for the same member. | ||
|
|
||
| You also cannot have for the same map/member separate configurations for `Map` and `ProjectTo`. | ||
|
|
||
| Another possible occurence is with `ForAllMaps` and `ForAllPropertyMaps` when it's possible to overwrite things already set in a particular map. | ||
|
|
||
| ## `ResolutionContext.Options` was removed | ||
|
|
||
| You should use `ResolutionContext.Items` to access the items passed in the `Map` call. | ||
|
|
||
| Instead of `ServiceCtor` you should use dependency injection or pass the needed objects in the `Map` call. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could simply return null here but I'm guessing people would keep asking why
Itemsis null.