public object[] GetList(int offset, int count)
{
int bufferOffset = this.Offset;
this.Offset = offset;
try
{
object[] objects = new object[count];
for (int i = 0; i < count; i++)
{
XmlBinaryNodeType nodeType = GetNodeType();
SkipNodeType();
DiagnosticUtility.DebugAssert(nodeType != XmlBinaryNodeType.StartListText, "");
ReadValue(nodeType, _listValue);
objects[i] = _listValue.ToObject();
}
return objects;
}
finally
{
this.Offset = bufferOffset;
}
}