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

TryReadDateTimeArray() private method

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

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

Same methods

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