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

◆ ReadContentAsDouble()

override double System.Xml.XmlSqlBinaryReader.ReadContentAsDouble ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 1181 of file XmlSqlBinaryReader.cs.

1182 {
1183 int num = _pos;
1184 try
1185 {
1186 double result;
1187 if (SetupContentAsXXX("ReadContentAsDouble"))
1188 {
1189 try
1190 {
1191 switch (_token)
1192 {
1193 case BinXmlToken.SQL_REAL:
1194 case BinXmlToken.SQL_FLOAT:
1195 result = ValueAsDouble();
1196 goto IL_0132;
1197 case BinXmlToken.SQL_SMALLINT:
1198 case BinXmlToken.SQL_INT:
1199 case BinXmlToken.SQL_MONEY:
1200 case BinXmlToken.SQL_BIT:
1201 case BinXmlToken.SQL_TINYINT:
1202 case BinXmlToken.SQL_BIGINT:
1203 case BinXmlToken.SQL_UUID:
1204 case BinXmlToken.SQL_DECIMAL:
1205 case BinXmlToken.SQL_NUMERIC:
1206 case BinXmlToken.SQL_BINARY:
1207 case BinXmlToken.SQL_VARBINARY:
1208 case BinXmlToken.SQL_DATETIME:
1209 case BinXmlToken.SQL_SMALLDATETIME:
1210 case BinXmlToken.SQL_SMALLMONEY:
1211 case BinXmlToken.SQL_IMAGE:
1212 case BinXmlToken.SQL_UDT:
1213 case BinXmlToken.XSD_KATMAI_TIMEOFFSET:
1214 case BinXmlToken.XSD_KATMAI_DATETIMEOFFSET:
1215 case BinXmlToken.XSD_KATMAI_DATEOFFSET:
1216 case BinXmlToken.XSD_KATMAI_TIME:
1217 case BinXmlToken.XSD_KATMAI_DATETIME:
1218 case BinXmlToken.XSD_KATMAI_DATE:
1219 case BinXmlToken.XSD_TIME:
1220 case BinXmlToken.XSD_DATETIME:
1221 case BinXmlToken.XSD_DATE:
1222 case BinXmlToken.XSD_BINHEX:
1223 case BinXmlToken.XSD_BASE64:
1224 case BinXmlToken.XSD_BOOLEAN:
1225 case BinXmlToken.XSD_DECIMAL:
1226 case BinXmlToken.XSD_BYTE:
1227 case BinXmlToken.XSD_UNSIGNEDSHORT:
1228 case BinXmlToken.XSD_UNSIGNEDINT:
1229 case BinXmlToken.XSD_UNSIGNEDLONG:
1230 case BinXmlToken.XSD_QNAME:
1231 throw new InvalidCastException(System.SR.Format(System.SR.XmlBinary_CastNotSupported, _token, "Double"));
1232 case BinXmlToken.EndElem:
1233 case BinXmlToken.Element:
1234 return XmlConvert.ToDouble(string.Empty);
1235 }
1236 }
1237 catch (InvalidCastException innerException)
1238 {
1240 }
1241 catch (FormatException innerException2)
1242 {
1244 }
1245 catch (OverflowException innerException3)
1246 {
1248 }
1249 }
1250 goto end_IL_0007;
1251 IL_0132:
1252 num = FinishContentAsXXX(num);
1253 return result;
1254 end_IL_0007:;
1255 }
1256 finally
1257 {
1258 _pos = num;
1259 }
1260 return base.ReadContentAsDouble();
1261 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
static string XmlBinary_CastNotSupported
Definition SR.cs:1382
Definition SR.cs:7

References System.Xml.XmlSqlBinaryReader._pos, System.Xml.XmlSqlBinaryReader._token, System.Xml.Dictionary, System.Xml.XmlSqlBinaryReader.FinishContentAsXXX(), System.SR.Format(), System.Xml.XmlSqlBinaryReader.SetupContentAsXXX(), System.Xml.XmlConvert.ToDouble(), System.Xml.XmlSqlBinaryReader.ValueAsDouble(), System.SR.Xml_ReadContentAsFormatException, System.SR.XmlBinary_CastNotSupported, and System.Xml.XmlException.