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

◆ ReadContentAsDateTime()

override DateTime System.Xml.XsdValidatingReader.ReadContentAsDateTime ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 567 of file XsdValidatingReader.cs.

568 {
569 if (!XmlReader.CanReadContentAs(NodeType))
570 {
571 throw CreateReadContentAsException("ReadContentAsDateTime");
572 }
574 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
575 try
576 {
577 return xmlSchemaType?.ValueConverter.ToDateTime(value) ?? XmlUntypedConverter.Untyped.ToDateTime(value);
578 }
579 catch (InvalidCastException innerException)
580 {
582 }
583 catch (FormatException innerException2)
584 {
586 }
587 catch (OverflowException innerException3)
588 {
590 }
591 }
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.