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

◆ ValueAs() [2/2]

override object System.Xml.XPath.XPathNavigator.ValueAs ( Type returnType,
IXmlNamespaceResolver? nsResolver )
inlineinherited

Definition at line 668 of file XPathNavigator.cs.

669 {
670 if (nsResolver == null)
671 {
672 nsResolver = this;
673 }
674 IXmlSchemaInfo schemaInfo = SchemaInfo;
675 if (schemaInfo != null)
676 {
677 if (schemaInfo.Validity == XmlSchemaValidity.Valid)
678 {
680 if (xmlSchemaType == null)
681 {
682 xmlSchemaType = schemaInfo.SchemaType;
683 }
684 if (xmlSchemaType != null)
685 {
686 return xmlSchemaType.ValueConverter.ChangeType(Value, returnType, nsResolver);
687 }
688 }
689 else
690 {
692 if (xmlSchemaType != null)
693 {
694 XmlSchemaDatatype datatype = xmlSchemaType.Datatype;
695 if (datatype != null)
696 {
697 return xmlSchemaType.ValueConverter.ChangeType(datatype.ParseValue(Value, NameTable, nsResolver), returnType, nsResolver);
698 }
699 }
700 }
701 }
703 }
object ParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr)
static readonly XmlValueConverter Untyped
virtual ? IXmlSchemaInfo SchemaInfo
XmlSchemaSimpleType? MemberType

References System.Xml.Schema.IXmlSchemaInfo.MemberType, System.Xml.Schema.XmlSchemaDatatype.ParseValue(), System.Xml.XPath.XPathNavigator.SchemaInfo, System.Xml.Schema.IXmlSchemaInfo.SchemaType, System.Xml.Schema.XmlUntypedConverter.Untyped, System.Xml.Schema.IXmlSchemaInfo.Validity, and System.Xml.XPath.XPathItem.Value.