Skip to content

Missing Properties from Parent/Child classes in new Feature #110

Open
@Jadaw1n

Description

@Jadaw1n

Hi

When creating a new Feature (and possibly other objects) with the properties = a child class, then the Parent properties aren't in the resulting properties.

Using this code:

// class structure
        public class Parent
        {
            public string ParentString { get; set; } = "Test Parent";
        }

        public class Child : Parent
        {
            public string ChildString { get; set; } = "Test Child";
        }

// run this bit
var ls = new LineString(new List<Position> { new Position(47, 8), new Position(47.1, 8) });
var x = new Feature(ls, new Child()); // <--

results in the following value for x.Properties:

x.Properties
Count = 1
[0]: {[ChildString, Test Child]}

Where I'd expect it to have both ChildString and ParentString properties.
Is this an oversight, or is it maybe configurable somehow?

Otherwise thanks for the great library :)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions