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

◆ Match()

bool System.Xml.Serialization.SchemaObjectCache.Match ( XmlSchemaObject o1,
XmlSchemaObject o2,
bool shareTypes )
inlinepackage

Definition at line 103 of file SchemaObjectCache.cs.

104 {
105 if (o1 == o2)
106 {
107 return true;
108 }
109 if (o1.GetType() != o2.GetType())
110 {
111 return false;
112 }
113 if (Hash[o1] == null)
114 {
115 Hash[o1] = GetHash(o1);
116 }
117 int num = (int)Hash[o1];
118 int hash = GetHash(o2);
119 if (num != hash)
120 {
121 return false;
122 }
123 if (shareTypes)
124 {
125 return CompositeHash(o1, num) == CompositeHash(o2, hash);
126 }
127 return true;
128 }
int CompositeHash(XmlSchemaObject o, int hash)

References System.Xml.Serialization.SchemaObjectCache.CompositeHash(), System.Xml.Dictionary, System.Xml.Serialization.SchemaObjectCache.GetHash(), and System.Xml.Serialization.SchemaObjectCache.Hash.

Referenced by System.Xml.Serialization.SchemaObjectCache.AddItem().