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

◆ ConvertXmlToObject() [2/2]

override object System.Data.Common.SqlUdtStorage.ConvertXmlToObject ( XmlReader xmlReader,
XmlRootAttribute xmlAttrib )
inlinevirtual

Reimplemented from System.Data.Common.DataStorage.

Definition at line 163 of file SqlUdtStorage.cs.

164 {
165 if (xmlAttrib == null)
166 {
167 string text = xmlReader.GetAttribute("InstanceType", "urn:schemas-microsoft-com:xml-msdata");
168 if (text == null)
169 {
170 string attribute = xmlReader.GetAttribute("InstanceType", "http://www.w3.org/2001/XMLSchema-instance");
171 if (attribute != null)
172 {
173 text = XSDSchema.XsdtoClr(attribute).FullName;
174 }
175 }
176 Type type = ((text == null) ? _dataType : Type.GetType(text));
177 object obj = Activator.CreateInstance(type, nonPublic: true);
178 ((IXmlSerializable)obj).ReadXml(xmlReader);
179 return obj;
180 }
181 XmlSerializer xmlSerializer = ObjectStorage.GetXmlSerializer(_dataType, xmlAttrib);
183 }
static Type GetType(string value)

References System.Data.Common.DataStorage._dataType, System.Activator.CreateInstance(), System.Xml.Dictionary, System.Type.GetType(), System.Data.Common.ObjectStorage.GetXmlSerializer(), System.obj, System.text, System.type, and System.Data.XSDSchema.XsdtoClr().