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

◆ ReadElementContentAsDateTime() [1/2]

override DateTime System.Xml.XmlDictionaryReader.ReadElementContentAsDateTime ( )
inlinevirtualinherited

Reimplemented from System.Xml.XmlReader.

Definition at line 1209 of file XmlDictionaryReader.cs.

1210 {
1211 DateTime result;
1213 {
1214 Read();
1215 try
1216 {
1217 result = DateTime.Parse(string.Empty, NumberFormatInfo.InvariantInfo);
1218 }
1220 {
1221 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(string.Empty, "DateTime", exception));
1222 }
1223 catch (FormatException exception2)
1224 {
1225 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(string.Empty, "DateTime", exception2));
1226 }
1227 }
1228 else
1229 {
1231 result = ReadContentAsDateTime();
1233 }
1234 return result;
1235 }
virtual bool IsStartElement()
Definition XmlReader.cs:760
virtual void ReadStartElement()
Definition XmlReader.cs:629
virtual void ReadEndElement()
Definition XmlReader.cs:751
virtual DateTime ReadContentAsDateTime()
Definition XmlReader.cs:174

References System.Xml.XmlExceptionHelper.CreateConversionException(), System.Xml.Dictionary, System.exception, System.Globalization.NumberFormatInfo.InvariantInfo, System.Xml.XmlReader.IsEmptyElement, System.Xml.XmlReader.IsStartElement(), System.DateTime.Parse(), System.Xml.XmlReader.Read(), System.Xml.XmlReader.ReadContentAsDateTime(), System.Xml.XmlReader.ReadEndElement(), System.Xml.XmlReader.ReadStartElement(), and System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError().

Referenced by System.Xml.XmlDictionaryReader.ReadArray().