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

◆ CompareTo()

int System.Data.Common.ObjectStorage.CompareTo ( object valueNo1,
object valueNo2 )
inlineprivate

Definition at line 131 of file ObjectStorage.cs.

132 {
133 if (valueNo1 == null)
134 {
135 return -1;
136 }
137 if (valueNo2 == null)
138 {
139 return 1;
140 }
141 if (valueNo1 == valueNo2)
142 {
143 return 0;
144 }
145 if (valueNo1 == _nullValue)
146 {
147 return -1;
148 }
149 if (valueNo2 == _nullValue)
150 {
151 return 1;
152 }
153 if (valueNo1 is IComparable)
154 {
155 try
156 {
157 return ((IComparable)valueNo1).CompareTo(valueNo2);
158 }
159 catch (ArgumentException e)
160 {
161 ExceptionBuilder.TraceExceptionWithoutRethrow(e);
162 }
163 }
165 }
int CompareWithFamilies(object valueNo1, object valueNo2)

References System.Data.Common.DataStorage._nullValue, System.Data.Common.ObjectStorage.CompareWithFamilies(), and System.Data.ExceptionBuilder.TraceExceptionWithoutRethrow().

Referenced by System.Data.Common.ObjectStorage.CompareWithFamilies().