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

◆ ReadContentAsDateTimeOffset()

virtual DateTimeOffset System.Xml.XmlReader.ReadContentAsDateTimeOffset ( )
inlinevirtualinherited

Reimplemented in System.Xml.XmlAsyncCheckReader.

Definition at line 190 of file XmlReader.cs.

191 {
192 if (!CanReadContentAs())
193 {
194 throw CreateReadContentAsException("ReadContentAsDateTimeOffset");
195 }
196 try
197 {
198 return XmlConvert.ToDateTimeOffset(InternalReadContentAsString());
199 }
200 catch (FormatException innerException)
201 {
202 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "DateTimeOffset", innerException, this as IXmlLineInfo);
203 }
204 }
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.ToDateTimeOffset(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.XmlSerializableReader.ReadContentAsDateTime(), System.Xml.XmlAsyncCheckReader.ReadContentAsDateTimeOffset(), and System.Xml.XmlBinaryWriter.WriteTextNode().