Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Datatype_long.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
4{
5 private static readonly Type s_atomicValueType = typeof(long);
6
7 private static readonly Type s_listValueType = typeof(long[]);
8
9 private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(-9223372036854775808m, 9223372036854775807m);
10
12
13 internal override bool HasValueFacets => true;
14
15 public override XmlTypeCode TypeCode => XmlTypeCode.Long;
16
17 public override Type ValueType => s_atomicValueType;
18
19 internal override Type ListValueType => s_listValueType;
20
21 internal override int Compare(object value1, object value2)
22 {
23 return ((long)value1).CompareTo((long)value2);
24 }
25
26 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
27 {
28 typedValue = null;
29 Exception ex = s_numeric10FacetsChecker.CheckLexicalFacets(ref s, this);
30 if (ex == null)
31 {
32 ex = XmlConvert.TryToInt64(s, out var result);
33 if (ex == null)
34 {
35 ex = s_numeric10FacetsChecker.CheckValueFacets(result, this);
36 if (ex == null)
37 {
38 typedValue = result;
39 return null;
40 }
41 }
42 }
43 return ex;
44 }
45}
override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
static readonly Type s_atomicValueType
override int Compare(object value1, object value2)
static readonly FacetsChecker s_numeric10FacetsChecker
static readonly Type s_listValueType
static Exception TryToInt64(string s, out long result)
TypeCode
Definition TypeCode.cs:4