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

◆ ReadContentAs() [2/2]

override object System.Xml.XmlDictionaryReader.ReadContentAs ( Type type,
IXmlNamespaceResolver? namespaceResolver )
inlinevirtualinherited

Reimplemented from System.Xml.XmlReader.

Definition at line 982 of file XmlDictionaryReader.cs.

983 {
984 if (type == typeof(Guid[]))
985 {
986 string[] array = (string[])ReadContentAs(typeof(string[]), namespaceResolver);
987 Guid[] array2 = new Guid[array.Length];
988 for (int i = 0; i < array.Length; i++)
989 {
990 array2[i] = XmlConverter.ToGuid(array[i]);
991 }
992 return array2;
993 }
994 if (type == typeof(UniqueId[]))
995 {
996 string[] array3 = (string[])ReadContentAs(typeof(string[]), namespaceResolver);
997 UniqueId[] array4 = new UniqueId[array3.Length];
998 for (int j = 0; j < array3.Length; j++)
999 {
1000 array4[j] = XmlConverter.ToUniqueId(array3[j]);
1001 }
1002 return array4;
1003 }
1004 return base.ReadContentAs(type, namespaceResolver);
1005 }
override object ReadContentAs(Type type, IXmlNamespaceResolver? namespaceResolver)

References System.array, System.Xml.Dictionary, System.Xml.XmlDictionaryReader.ReadContentAs(), System.Xml.XmlConverter.ToGuid(), System.Xml.XmlConverter.ToUniqueId(), and System.type.

Referenced by System.Xml.XmlDictionaryReader.ReadContentAs().