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.
|
public sealed class ReadablePropertiesTypeInspector : ReflectionTypeInspector |
|
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.
|
public sealed class WritablePropertiesTypeInspector : ReflectionTypeInspector |
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
ReadablePropertiesTypeInspectorand and fromReflectionPropertyDescriptor.YamlDotNet/YamlDotNet/Serialization/TypeInspectors/ReadablePropertiesTypeInspector.cs
Line 33 in 485daaa
YamlDotNet/YamlDotNet/Serialization/TypeInspectors/ReadablePropertiesTypeInspector.cs
Line 63 in 485daaa
And extract
ReflectionPropertyDescriptorto a top-level class (see Additional context), or make protected.Describe alternatives you've considered
Copy/paste
ReadablePropertiesTypeInspectorand tweak the order.Additional context
WritablePropertiesTypeInspectorcan be also later refactored to share code withReadablePropertiesTypeInspector.YamlDotNet/YamlDotNet/Serialization/TypeInspectors/WritablePropertiesTypeInspector.cs
Line 33 in 485daaa