internal bool TryReadDoubleArray(XmlObjectSerializerReadContext context,
#endif
XmlDictionaryString itemName, XmlDictionaryString itemNamespace,
int arrayLength, out double[] array)
{
if (dictionaryReader == null)
{
array = null;
return false;
}
if (arrayLength != -1)
{
CheckExpectedArrayLength(context, arrayLength);
array = new double[arrayLength];
int read = 0, offset = 0;
while ((read = dictionaryReader.ReadArray(itemName, itemNamespace, array, offset, arrayLength - offset)) > 0)
{
offset += read;
}
CheckActualArrayLength(arrayLength, offset, itemName, itemNamespace);
}
else
{
array = DoubleArrayHelperWithDictionaryString.Instance.ReadArray(
dictionaryReader, itemName, itemNamespace, GetArrayLengthQuota(context));
context.IncrementItemCount(array.Length);
}
return true;
}