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

◆ ChangeType() [4/9]

override object System.Xml.Schema.XmlNumeric2Converter.ChangeType ( double value,
Type destinationType )
inline

Definition at line 142 of file XmlNumeric2Converter.cs.

143 {
144 if (destinationType == null)
145 {
146 throw new ArgumentNullException("destinationType");
147 }
148 if (destinationType == XmlBaseConverter.ObjectType)
149 {
150 destinationType = base.DefaultClrType;
151 }
152 if (destinationType == XmlBaseConverter.DoubleType)
153 {
154 return value;
155 }
156 if (destinationType == XmlBaseConverter.SingleType)
157 {
158 return (float)value;
159 }
160 if (destinationType == XmlBaseConverter.StringType)
161 {
162 return ToString(value);
163 }
164 if (destinationType == XmlBaseConverter.XmlAtomicValueType)
165 {
166 return new XmlAtomicValue(base.SchemaType, value);
167 }
168 if (destinationType == XmlBaseConverter.XPathItemType)
169 {
170 return new XmlAtomicValue(base.SchemaType, value);
171 }
172 return ChangeListType(value, destinationType, null);
173 }
virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver)
XmlBaseConverter(XmlSchemaType schemaType)

References System.Xml.Schema.XmlBaseConverter.ChangeListType(), System.Xml.Dictionary, System.Xml.Schema.XmlBaseConverter.DoubleType, System.Xml.Schema.XmlBaseConverter.ObjectType, System.Xml.Schema.XmlBaseConverter.SingleType, System.Xml.Schema.XmlBaseConverter.StringType, System.ToString, System.value, System.Xml.Schema.XmlBaseConverter.XmlAtomicValueType, and System.Xml.Schema.XmlBaseConverter.XPathItemType.