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

◆ ReadContentAs() [1/2]

override object System.Xml.XsdValidatingReader.ReadContentAs ( Type returnType,
IXmlNamespaceResolver namespaceResolver )
inline

Definition at line 753 of file XsdValidatingReader.cs.

754 {
755 if (!XmlReader.CanReadContentAs(NodeType))
756 {
757 throw CreateReadContentAsException("ReadContentAs");
758 }
759 string originalStringValue;
761 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
762 try
763 {
764 if (xmlSchemaType != null)
765 {
766 if (returnType == typeof(DateTimeOffset) && xmlSchemaType.Datatype is Datatype_dateTimeBase)
767 {
769 }
770 return xmlSchemaType.ValueConverter.ChangeType(value, returnType);
771 }
773 }
774 catch (FormatException innerException)
775 {
777 }
778 catch (InvalidCastException innerException2)
779 {
781 }
782 catch (OverflowException innerException3)
783 {
785 }
786 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
static readonly XmlValueConverter Untyped
Exception CreateReadContentAsException(string methodName)

References System.Xml.XsdValidatingReader.AttributeXmlType, System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.Xml.XsdValidatingReader.ElementXmlType, System.Xml.XsdValidatingReader.InternalReadContentAsObject(), System.Xml.XsdValidatingReader.NodeType, System.Xml.Schema.XmlUntypedConverter.Untyped, System.value, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.