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

◆ ReadContentAsBoolean()

override bool System.Xml.XsdValidatingReader.ReadContentAsBoolean ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 541 of file XsdValidatingReader.cs.

542 {
543 if (!XmlReader.CanReadContentAs(NodeType))
544 {
545 throw CreateReadContentAsException("ReadContentAsBoolean");
546 }
548 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
549 try
550 {
551 return xmlSchemaType?.ValueConverter.ToBoolean(value) ?? XmlUntypedConverter.Untyped.ToBoolean(value);
552 }
553 catch (InvalidCastException innerException)
554 {
556 }
557 catch (FormatException innerException2)
558 {
560 }
561 catch (OverflowException innerException3)
562 {
564 }
565 }
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.