Support mapping object factory parameters#2351
Conversation
|
Thanks for the contribution. Before we review this further, please update the PR description to use the repository’s PR template. Also, for larger feature PRs like this, please open an issue first so the scope and intended design can be discussed before implementation. |
Hello. I updated the PR as per your template. I did raise this previously and this design was your recomendation to me. |
|
The PR description still looks VERY AI generated…
then
Where did you raise it previously? Please link it. |
Support mapping object factory parameters
Description
Adds
ObjectFactoryAttribute.MapToParametersso object factory method parameters can be mapped from source members using the same matching rules as constructor mappings.This enables object factories such as:
The PR includes:
MapToParametersand supported factory signatures.Related issue: none. This PR was opened before the requested issue-first design discussion; I am happy to move the design discussion to an issue if preferred.
Checklist
Validation performed:
dotnet test test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj --filter "FullyQualifiedName~ObjectFactoryTest|FullyQualifiedName~ExpressionMappingTest"dotnet test Riok.Mapperly.slnx --no-restore -m:1 --blame-crash --results-directory artifacts/TestResults/final-verification