Skip to content

Option to serialize members of base types first #984

@n9

Description

@n9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions