Skip to content

10.1 - Add optimal constructor selector - #1028

Merged
DocSvartz merged 4 commits into
MapsterMapper:v10.1.0from
DocSvartz:10.1---optimal-Ctor
Oct 21, 2026
Merged

DocSvartz merged 4 commits into
MapsterMapper:v10.1.0from
DocSvartz:10.1---optimal-Ctor

Conversation

@DocSvartz

@DocSvartz DocSvartz commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Changes:
For Record type by default, and other type when using settings .MapToConstructor(true) a strategy for selecting the optimal constructor will be used.

The optimal constructor strategy selects the constructor with the fewest unfilled parameters (i.e., the one with the greatest difference between the number of using sources members and the total number of constructor arguments); in the event of a tie, it favors the most detailed constructor - the one with the highest total number of parameters.

@DocSvartz DocSvartz changed the title 10.1 - Added optimal constructor selector 10.1 - Add optimal constructor selector Oct 20, 2026
@DocSvartz
DocSvartz merged commit ce1727f into MapsterMapper:v10.1.0 Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant