reader.MoveToContent();
var xs = new XmlSerializer(typeof(DerivedTypePackage<ScriptExecutionTask>[]));
var packagedTasks = xs.Deserialize(reader.ReadSubtree()) as DerivedTypePackage<ScriptExecutionTask>[];
reader.ReadEndElement();
After calling xs.Deserialize(reader.ReadSubtree())
, the reader is pointing at the end element for ArrayOfDerivedTypePackageOfScriptExecutionTask
, and it's returned an array. Seems to be working fine, except that the array only contains one element. Checking the XML, there are multiple DerivedTypePackageOfScriptExecutionTask
nodes, but it seems like they're getting skipped. Why?