Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadCollectionItems()

object System.Runtime.Serialization.ReflectionReader.ReadCollectionItems ( XmlReaderDelegator xmlReader,
XmlObjectSerializerReadContext context,
XmlDictionaryString collectionItemName,
XmlDictionaryString collectionItemNamespace,
CollectionDataContract collectionContract,
object resultCollection,
bool isReadOnlyCollection )
inlineprivateinherited

Definition at line 119 of file ReflectionReader.cs.

120 {
127 int num = 0;
128 while (true)
129 {
131 {
134 num++;
135 continue;
136 }
137 if (xmlReader.NodeType == XmlNodeType.EndElement)
138 {
139 break;
140 }
141 if (!xmlReader.IsStartElement())
142 {
143 throw XmlObjectSerializerReadContext.CreateUnexpectedStateException(XmlNodeType.Element, xmlReader);
144 }
145 context.SkipUnknownElement(xmlReader);
146 }
147 context.IncrementItemCount(num);
149 {
150 MethodInfo methodInfo2 = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType);
151 resultCollection = methodInfo2.Invoke(null, new object[2] { resultCollection, num });
152 }
153 return resultCollection;
154 }
string GetCollectionContractNamespace(CollectionDataContract collectionContract)
CollectionReadItemDelegate GetCollectionReadItemDelegate(CollectionDataContract collectionContract)
bool IsArrayLikeCollection(CollectionDataContract collectionContract)
string GetCollectionContractItemName(CollectionDataContract collectionContract)
delegate object CollectionReadItemDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs)
delegate object CollectionSetItemDelegate(object resultCollection, object collectionItem, int itemIndex)

References System.Runtime.Serialization.ReflectionReader.CollectionReadItemDelegate(), System.Runtime.Serialization.ReflectionReader.CollectionSetItemDelegate(), System.Runtime.Serialization.ReflectionReader.CollectionSetItemDelegateMethod, System.Runtime.Serialization.ReflectionReader.GetCollectionContractItemName(), System.Runtime.Serialization.ReflectionReader.GetCollectionContractNamespace(), and System.Runtime.Serialization.ReflectionReader.GetCollectionReadItemDelegate().

Referenced by System.Runtime.Serialization.ReflectionReader.ReflectionReadCollectionCore(), and System.Runtime.Serialization.ReflectionReader.ReflectionReadGetOnlyCollection().