Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Datatype_double.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
4{
5 private static readonly Type s_atomicValueType = typeof(double);
6
7 private static readonly Type s_listValueType = typeof(double[]);
8
10
11 public override XmlTypeCode TypeCode => XmlTypeCode.Double;
12
13 public override Type ValueType => s_atomicValueType;
14
15 internal override Type ListValueType => s_listValueType;
16
18
20
22 {
23 return XmlNumeric2Converter.Create(schemaType);
24 }
25
26 internal override int Compare(object value1, object value2)
27 {
28 return ((double)value1).CompareTo((double)value2);
29 }
30
31 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
32 {
33 typedValue = null;
35 if (ex == null)
36 {
37 ex = XmlConvert.TryToDouble(s, out var result);
38 if (ex == null)
39 {
40 ex = DatatypeImplementation.numeric2FacetsChecker.CheckValueFacets(result, this);
41 if (ex == null)
42 {
43 typedValue = result;
44 return null;
45 }
46 }
47 }
48 return ex;
49 }
50}
override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
static readonly Type s_listValueType
override RestrictionFlags ValidRestrictionFlags
override int Compare(object value1, object value2)
override XmlSchemaWhiteSpace BuiltInWhitespaceFacet
static readonly Type s_atomicValueType
override XmlValueConverter CreateValueConverter(XmlSchemaType schemaType)
static XmlValueConverter Create(XmlSchemaType schemaType)
static Exception TryToDouble(string s, out double result)
TypeCode
Definition TypeCode.cs:4