Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Datatype_uuid.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
3internal sealed class Datatype_uuid : Datatype_anySimpleType
4{
5 private static readonly Type s_atomicValueType = typeof(Guid);
6
7 private static readonly Type s_listValueType = typeof(Guid[]);
8
9 public override Type ValueType => s_atomicValueType;
10
11 internal override Type ListValueType => s_listValueType;
12
14
15 internal override int Compare(object value1, object value2)
16 {
17 if (!((Guid)value1).Equals(value2))
18 {
19 return -1;
20 }
21 return 0;
22 }
23
25 {
26 try
27 {
28 return XmlConvert.ToGuid(s);
29 }
30 catch (XmlSchemaException)
31 {
32 throw;
33 }
35 {
37 }
38 }
39
40 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
41 {
42 typedValue = null;
43 Guid result;
45 if (ex == null)
46 {
47 typedValue = result;
48 return null;
49 }
50 return ex;
51 }
52}
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)
static readonly Type s_atomicValueType
static readonly Type s_listValueType
override int Compare(object value1, object value2)
override RestrictionFlags ValidRestrictionFlags
override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
static Guid ToGuid(string s)
static Exception TryToGuid(string s, out Guid result)