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

◆ ChangeType() [8/9]

override object System.Xml.Schema.XmlStringConverter.ChangeType ( object value,
Type destinationType,
IXmlNamespaceResolver nsResolver )
inline

Definition at line 62 of file XmlStringConverter.cs.

63 {
64 if (value == null)
65 {
66 throw new ArgumentNullException("value");
67 }
68 if (destinationType == null)
69 {
70 throw new ArgumentNullException("destinationType");
71 }
72 Type type = value.GetType();
73 if (destinationType == XmlBaseConverter.ObjectType)
74 {
75 destinationType = base.DefaultClrType;
76 }
77 if (destinationType == XmlBaseConverter.StringType)
78 {
79 return ToString(value, nsResolver);
80 }
81 if (destinationType == XmlBaseConverter.XmlAtomicValueType)
82 {
83 if (type == XmlBaseConverter.StringType)
84 {
85 return new XmlAtomicValue(base.SchemaType, (string)value);
86 }
87 if (type == XmlBaseConverter.XmlAtomicValueType)
88 {
89 return (XmlAtomicValue)value;
90 }
91 }
92 if (destinationType == XmlBaseConverter.XPathItemType)
93 {
94 if (type == XmlBaseConverter.StringType)
95 {
96 return new XmlAtomicValue(base.SchemaType, (string)value);
97 }
98 if (type == XmlBaseConverter.XmlAtomicValueType)
99 {
100 return (XmlAtomicValue)value;
101 }
102 }
104 }
virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver)
XmlBaseConverter(XmlSchemaType schemaType)

References System.Xml.Schema.XmlBaseConverter.ChangeListType(), System.Xml.Dictionary, System.Type.GetType(), System.Xml.Schema.XmlBaseConverter.ObjectType, System.Xml.Schema.XmlBaseConverter.StringType, System.ToString, System.type, System.value, System.Xml.Schema.XmlBaseConverter.XmlAtomicValueType, and System.Xml.Schema.XmlBaseConverter.XPathItemType.