Remove static mapper and add DSL - #5
Merged
Merged
Conversation
added 4 commits
March 23, 2026 21:48
* Removes the static Mapper class since it does not cover all features (parameters, ignore, usemap) and setting up Profiles with a single instance has the same effect as using the static mapper. * Moved parts of the static mapper, which are still used, to the Mapify class. * Removed unittests for the static mapper. * Updated the readme +semver:major
Added a .Map fluent API to be able to register single property mappings. This allows to avoid the initializer mapping e.g. if the required keyword is used often in target types, where each required property would have to be mapped explicitely, even if they could be mapped by convention. The initializer mapping works as before though, since the DSL is just an addition.
Added more tests to ensure that objects with required fields are mapped correctly. Fixed an issue where ignored bindings were removed for DSL bindings that used the Ignored marker.
Removes the requirement to install the .NET Framework developer pack on CI runners by adding `Microsoft.NETFramework.ReferenceAssemblies` to the project files. Also updates the test runner label in the CI workflow to net472.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a breaking change, thus the major version in increased.
It is relatively easy to replace the static mapper though, by creating a static instance of Mapify.