So habe ich eine XML, die eine ähnliche Struktur wie diese hat:C# Teil Deserialisierung
<MyObject>
<PropertyA>Value</PropertyA>
<PropertyB>Value</PropertyB>
<PropertyC>Value</PropertyC>
<ArrayOfOtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
</ArrayOfOtherObject>
</MyObject>
Gibt es eine Möglichkeit, dass ich MyObject deserialisieren kann aber nicht die ArrayOfOtherObject? Und dann später, wenn benötigt, eine Lazy-Ladung von ArrayOfOtherObject?
Ich verwende normalerweise XmlDeserialization, aber AFAIK lädt immer das Ganze.
Danke!
ehrlich zu sein, es sei denn, das Datenvolumen riesig würden Sie besser dran, geht für die einfachste Ansatz und deserialize es alles. –
+1 gute Frage Carlo – toddmo