You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
Currently we try to avoid using auto properties because when serializing a instance the serializer will use the name of the backing fields which have a ugly name like <Foo>k__BackingField.
Consider changing the serializers to understand the relationship between the backing fields and the properties to allow them to handle these in a nicer way
Analysis
Allows the use of auto properties without downsides in both our code and end users code. Which can clean up some files alot.
3th party types that use autoproperties will end up with the ugly backingfield name in serialized form.
In the future features like records might be added to C# which might also make use of properties?
We have to find a reliable way to find the relationship between backingfields and properties.
Simple example of getting the backingfield or the autoproperty. No idea if this is stable enough, needs more research.
Summary
Currently we try to avoid using auto properties because when serializing a instance the serializer will use the name of the backing fields which have a ugly name like
<Foo>k__BackingField.Consider changing the serializers to understand the relationship between the backing fields and the properties to allow them to handle these in a nicer way
Analysis
Simple example of getting the backingfield or the autoproperty. No idea if this is stable enough, needs more research.