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

TryReadDecimalArray() private method

private TryReadDecimalArray ( XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, int arrayLength, decimal &array ) : bool
context XmlObjectSerializerReadContext
itemName XmlDictionaryString
itemNamespace XmlDictionaryString
arrayLength int
array decimal
return bool
        internal bool TryReadDecimalArray(XmlObjectSerializerReadContext context,
#endif
            XmlDictionaryString itemName, XmlDictionaryString itemNamespace,
            int arrayLength, out decimal[] array)
        {
            if (dictionaryReader == null)
            {
                array = null;
                return false;
            }

            if (arrayLength != -1)
            {
                CheckExpectedArrayLength(context, arrayLength);
                array = new decimal[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 = DecimalArrayHelperWithDictionaryString.Instance.ReadArray(
                    dictionaryReader, itemName, itemNamespace, GetArrayLengthQuota(context));
                context.IncrementItemCount(array.Length);
            }
            return true;
        }

Same methods

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