Support fields
See original GitHub issueDescribe the bug Mapping from for example System.Numerics.Quaternion is broken. I get the feeling that this might be something that’s either not spelled out enough in the documentation or something that is an oversight because people mostly deal with Properties anyway. Anyway mapping from/to fields does not work. They are completely ignored. Which is a shame because I do tend to need such mapping from time to time and I currently have to do them manually.
To Reproduce
public class Quat
{
public float X;
public float Y;
public float Z;
public float W;
}
[Mapper]
public static partial class Map
{
public static partial Quat ToQuat(Quaternion quaternion);
}
Generated code:
public static partial class Map
{
public static partial ClassLibrary1.Quat ToQuat(System.Numerics.Quaternion quaternion)
{
var target = new ClassLibrary1.Quat();
return target;
}
}
Environment (please complete the following information):
- Mapperly Version: 2.6.0
- .NET Version: 7
- Target Framework: 7
- OS: Linux
Additional context
Issue Analytics
- State:
- Created 8 months ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Support fields
This module is an add-on to the Support Ticketing system module. It allows an administrator to define custom cck fields to the STS...
Read more >About ticket fields
Standard ticket fields are the predefined fields that agents see in a ticket. · Custom ticket fields can be created in addition to...
Read more >Adding custom fields to your tickets and support request form
Custom ticket fields are typically used to gather more information about the support issue or product or service. You can add custom fields...
Read more >Support Fields
Support Fields helps to organize support tickets. The plugin allows to create forms the customer needs to go through before submitting a ...
Read more >Configure issue custom fields
Jira application issues are made up of fields. You can choose any number of fields to appear when creating, editing, or transitioning issues....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
On a second thought and after reading @Blackclaws’s comment I think enabling field mappings by default should be fine and even expected by most of users. #346 adds support for fields. Field mappings are enabled by default and the only currently implemented way to disable them is by using
MapperIgnoreTarget
/MapperIgnoreSource
. A next release should be published in the upcoming days including this feature.A lot of devs expect consistent behaviors between different .NET features. So having a feature that behaves like Fody.PropertyChanged or System.Text.Json makes more sense in my vision of things.
The new “record” type for example is a compact syntax to create a class or struct with only properties.
I understand what you mean with mapping those structs.