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

◆ ReadContentAsBoolean()

virtual bool System.Xml.XmlReader.ReadContentAsBoolean ( )
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 158 of file XmlReader.cs.

159 {
160 if (!CanReadContentAs())
161 {
162 throw CreateReadContentAsException("ReadContentAsBoolean");
163 }
164 try
165 {
166 return XmlConvert.ToBoolean(InternalReadContentAsString());
167 }
168 catch (FormatException innerException)
169 {
170 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "Boolean", innerException, this as IXmlLineInfo);
171 }
172 }
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.ToBoolean(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsBoolean(), System.Runtime.Serialization.XmlSerializableReader.ReadContentAsBoolean(), System.Xml.XmlDictionaryReader.XmlWrappedReader.ReadContentAsBoolean(), System.Xml.XmlAsyncCheckReader.ReadContentAsBoolean(), System.Xml.XmlSubtreeReader.ReadContentAsBoolean(), System.Xml.XmlDictionaryReader.ReadElementContentAsBoolean(), System.Xml.XmlReader.ReadElementContentAsBoolean(), and System.Xml.XmlBinaryWriter.WriteTextNode().