-
-
Notifications
You must be signed in to change notification settings - Fork 507
Description
Is your feature request related to a problem? Please describe.
Members are serialized in the order returned by reflection, with members of base types coming last, which is sometimes not desirable.
Describe the solution you'd like
Remove sealed from ReadablePropertiesTypeInspector and and from ReflectionPropertyDescriptor.
YamlDotNet/YamlDotNet/Serialization/TypeInspectors/ReadablePropertiesTypeInspector.cs
Line 33 in 485daaa
| public sealed class ReadablePropertiesTypeInspector : ReflectionTypeInspector |
YamlDotNet/YamlDotNet/Serialization/TypeInspectors/ReadablePropertiesTypeInspector.cs
Line 63 in 485daaa
| private sealed class ReflectionPropertyDescriptor : IPropertyDescriptor |
And extract ReflectionPropertyDescriptor to a top-level class (see Additional context), or make protected.
Describe alternatives you've considered
Copy/paste ReadablePropertiesTypeInspector and tweak the order.
Additional context
WritablePropertiesTypeInspector can be also later refactored to share code with ReadablePropertiesTypeInspector.
YamlDotNet/YamlDotNet/Serialization/TypeInspectors/WritablePropertiesTypeInspector.cs
Line 33 in 485daaa
| public sealed class WritablePropertiesTypeInspector : ReflectionTypeInspector |