-
Notifications
You must be signed in to change notification settings - Fork 334
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
Misleading exception message for ctor argument names #719
Comments
What should happen in this scenario if name-dependency was reduced?
|
@stagep What version of mapster are you using? By default, mapping to class class must always have a constructor without parameters. After renaming Use this if you need to map to a class constructor
|
@andrerav Possible regression in the development branch. I don't remember if it was like that initially or not)) Properties without a setter are not updated for classes.
|
@DocSvartz Hm, that would be a read-only autoproperty. They can only be assigned in the constructor or as part of the declaration. So I think this is as expected. Source: https://codeblog.jonskeet.uk/2014/12/08/c-6-in-action/ |
@andrerav I also think that the behavior is consistent with the specification for this type of fields. The behavior for class in 7.4 is similar. The field is not updated with the value from the Source
|
There's an exception produced when mapping to a class with a ctor:
The following exception is produced:
The exception message seems misleading as (I may have missed it in documentation) mapster seems to depend on argument names.
Renaming
Destination
ctor argument fromnumber
toid
is enough for the test to succeed. That is, changing to the following:Suggestions:
The text was updated successfully, but these errors were encountered: