Десериализация GML

Сгенерировал класс C# из xsd

xsd.exe" ymaps.xsd gml.xsd smil20.xsd smil20-language.xsd /classes

Когда пытаюсь десериализовать xml от GeoCodeApi, в примере код десериализации

    XmlSerializer serializer = new XmlSerializer(typeof(ymaps));

    [TestMethod]
    public void Deserialize()
    {
        using (var file = new FileStream($"./TestData/Sample1.xml", FileMode.Open))
        {
            var result = (ymaps)serializer.Deserialize(file);
        }

    }

Содержимое свойства featureMember - пусто, все свойства null

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.opengis.net/gml")]
[System.Xml.Serialization.XmlRootAttribute("featureMember", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public partial class FeaturePropertyType {

    private AbstractFeatureType _FeatureField;

    private string remoteSchemaField;

    /// <remarks/>
    public AbstractFeatureType _Feature {
        get {
            return this._FeatureField;
        }
        set {
            this._FeatureField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, DataType="anyURI")]
    public string remoteSchema {
        get {
            return this.remoteSchemaField;
        }
        set {
            this.remoteSchemaField = value;
        }
    }
}

Как я понял содержимое элемента GeoObject должно помещаться в _Feature, но _Feature равно null


Ответы (0 шт):