Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Datatype_fixed.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
3internal sealed class Datatype_fixed : Datatype_decimal
4{
6 {
8 try
9 {
11 decimal num = XmlConvert.ToDecimal(s);
12 ex = numeric10FacetsChecker.CheckTotalAndFractionDigits(num, 18, 4, checkTotal: true, checkFraction: true);
13 if (ex == null)
14 {
15 return num;
16 }
17 }
18 catch (XmlSchemaException)
19 {
20 throw;
21 }
23 {
25 }
26 throw ex;
27 }
28
29 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
30 {
31 typedValue = null;
32 decimal result;
34 if (ex == null)
35 {
38 if (ex == null)
39 {
40 typedValue = result;
41 return null;
42 }
43 }
44 return ex;
45 }
46}
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Sch_InvalidValue
Definition SR.cs:484
Definition SR.cs:7
override object ParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr)
override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
Exception CheckTotalAndFractionDigits(decimal value, int totalDigits, int fractionDigits, bool checkTotal, bool checkFraction)
static Exception TryToDecimal(string s, out decimal result)
static decimal ToDecimal(string s)