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

◆ ReadContentAsDateTime()

virtual DateTime System.Xml.XmlReader.ReadContentAsDateTime ( )
inlinevirtualinherited

Reimplemented in System.Runtime.Serialization.XmlSerializableReader, System.Xml.XmlBaseReader, System.Xml.XmlDictionaryReader.XmlWrappedReader, System.Xml.XmlAsyncCheckReader, System.Xml.XmlSqlBinaryReader, System.Xml.XmlSubtreeReader, and System.Xml.XsdValidatingReader.

Definition at line 174 of file XmlReader.cs.

175 {
176 if (!CanReadContentAs())
177 {
178 throw CreateReadContentAsException("ReadContentAsDateTime");
179 }
180 try
181 {
182 return XmlConvert.ToDateTime(InternalReadContentAsString(), XmlDateTimeSerializationMode.RoundtripKind);
183 }
184 catch (FormatException innerException)
185 {
186 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "DateTime", innerException, this as IXmlLineInfo);
187 }
188 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
Exception CreateReadContentAsException(string methodName)
string InternalReadContentAsString()

References System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.Xml.XmlReader.InternalReadContentAsString(), System.Xml.XmlConvert.ToDateTime(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsDateTime(), System.Xml.XmlDictionaryReader.XmlWrappedReader.ReadContentAsDateTime(), System.Xml.XmlAsyncCheckReader.ReadContentAsDateTime(), System.Xml.XmlSubtreeReader.ReadContentAsDateTime(), System.Xml.XmlDictionaryReader.ReadElementContentAsDateTime(), and System.Xml.XmlReader.ReadElementContentAsDateTime().