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

◆ ReadContentAsInt()

override int System.Xml.XsdValidatingReader.ReadContentAsInt ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 671 of file XsdValidatingReader.cs.

672 {
673 if (!XmlReader.CanReadContentAs(NodeType))
674 {
675 throw CreateReadContentAsException("ReadContentAsInt");
676 }
678 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
679 try
680 {
681 return xmlSchemaType?.ValueConverter.ToInt32(value) ?? XmlUntypedConverter.Untyped.ToInt32(value);
682 }
683 catch (InvalidCastException innerException)
684 {
686 }
687 catch (FormatException innerException2)
688 {
690 }
691 catch (OverflowException innerException3)
692 {
694 }
695 }
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.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.