System.Runtime.Serialization.XmlReaderDelegator.XmlReaderDelegator.TryReadDoubleArray C# (CSharp) Method

TryReadDoubleArray() private method

private TryReadDoubleArray ( XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, int arrayLength, double &array ) : bool
context XmlObjectSerializerReadContext
itemName XmlDictionaryString
itemNamespace XmlDictionaryString
arrayLength int
array double
return bool
        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;
        }

Same methods

XmlReaderDelegator.XmlReaderDelegator::TryReadDoubleArray ( XmlObjectSerializerReadContext context ) : bool
XmlReaderDelegator.XmlReaderDelegator