Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
ChameleonKey.cs
Go to the documentation of this file.
2
3namespace System.Xml.Schema;
4
5internal sealed class ChameleonKey
6{
7 internal string targetNS;
8
10
12
13 private int _hashCode;
14
24
25 public override int GetHashCode()
26 {
27 if (_hashCode == 0)
28 {
29 _hashCode = targetNS.GetHashCode() + chameleonLocation.GetHashCode() + ((originalSchema != null) ? originalSchema.GetHashCode() : 0);
30 }
31 return _hashCode;
32 }
33
34 public override bool Equals([NotNullWhen(true)] object obj)
35 {
36 if (this == obj)
37 {
38 return true;
39 }
41 {
42 if (targetNS.Equals(chameleonKey.targetNS) && chameleonLocation.Equals(chameleonKey.chameleonLocation))
43 {
44 return originalSchema == chameleonKey.originalSchema;
45 }
46 return false;
47 }
48 return false;
49 }
50}
string OriginalString
Definition Uri.cs:516
override bool Equals([NotNullWhen(true)] object? comparand)
Definition Uri.cs:1166
override int GetHashCode()
Definition Uri.cs:1103
ChameleonKey(string ns, XmlSchema originalSchema)
override bool Equals([NotNullWhen(true)] object obj)