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

◆ ToBoolean()

static bool System.Xml.XmlConvert.ToBoolean ( string s)
inlinestatic

Definition at line 656 of file XmlConvert.cs.

657 {
658 s = TrimString(s);
659 switch (s)
660 {
661 case "1":
662 case "true":
663 return true;
664 case "0":
665 case "false":
666 return false;
667 default:
668 throw new FormatException(System.SR.Format(System.SR.XmlConvert_BadFormat, s, "Boolean"));
669 }
670 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlConvert_BadFormat
Definition SR.cs:370
Definition SR.cs:7
static string TrimString(string value)

References System.SR.Format(), System.s, System.Xml.XmlConvert.TrimString(), and System.SR.XmlConvert_BadFormat.

Referenced by System.Xml.Schema.XmlUntypedConverter.ChangeType(), System.Xml.Schema.XmlBooleanConverter.ChangeType(), System.Xml.Schema.XmlUntypedConverter.ChangeType(), System.Data.Common.SqlConvert.ChangeTypeForXML(), System.Xml.Schema.XmlSchemaValidator.CheckXsiTypeAndNil(), System.Data.Common.BooleanStorage.ConvertXmlToObject(), System.Xml.Schema.XmlUntypedStringConverter.FromString(), System.Xml.Serialization.ReflectionXmlSerializationReader.GenerateEncodedMembersElement(), System.Xml.Serialization.XmlSerializationReader.GetNullAttr(), System.Data.XmlDataLoader.LoadColumn(), System.Xml.Linq.XAttribute.operator bool(), System.Xml.Linq.XElement.operator bool(), System.Xml.Linq.XAttribute.operator bool?(), System.Xml.Linq.XElement.operator bool?(), System.Xml.Schema.XsdBuilder.ParseBoolean(), System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_boolean(), System.Xml.XmlReader.ReadContentAsBoolean(), System.Xml.XmlSqlBinaryReader.ReadContentAsBoolean(), System.Xml.XmlReader.ReadElementContentAsBoolean(), System.Xml.Serialization.XmlSerializationReader.ReadTypedPrimitive(), System.Data.SqlTypes.SqlBytes.ReadXml(), System.Data.SqlTypes.SqlChars.ReadXml(), System.Data.SqlTypes.SqlXml.ReadXml(), System.Data.SqlTypes.SqlBinary.ReadXml(), System.Data.SqlTypes.SqlBoolean.ReadXml(), System.Data.SqlTypes.SqlByte.ReadXml(), System.Data.SqlTypes.SqlDateTime.ReadXml(), System.Data.SqlTypes.SqlDecimal.ReadXml(), System.Data.SqlTypes.SqlDouble.ReadXml(), System.Data.SqlTypes.SqlGuid.ReadXml(), System.Data.SqlTypes.SqlInt16.ReadXml(), System.Data.SqlTypes.SqlInt32.ReadXml(), System.Data.SqlTypes.SqlInt64.ReadXml(), System.Data.SqlTypes.SqlMoney.ReadXml(), System.Data.SqlTypes.SqlSingle.ReadXml(), System.Data.SqlTypes.SqlString.ReadXml(), System.Xml.Schema.XsdValidator.ThoroughGetElementDecl(), System.Xml.Schema.XmlBooleanConverter.ToBoolean(), System.Xml.Schema.XmlUntypedConverter.ToBoolean(), System.Xml.XmlConverter.ToBoolean(), System.Xml.Schema.XmlBooleanConverter.ToBoolean(), System.Xml.Schema.XmlUntypedConverter.ToBoolean(), and System.Xml.Serialization.ReflectionXmlSerializationReader.WritePrimitive().