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

◆ CommonNode< T >()

static T System.Dynamic.Utils.Helpers.CommonNode< T > ( T first,
T second,
Func< T, T > parent )
inlinestaticpackage
Type Constraints
T :class 

Definition at line 7 of file Helpers.cs.

7 : class
8 {
10 if (@default.Equals(first, second))
11 {
12 return first;
13 }
14 HashSet<T> hashSet = new HashSet<T>(@default);
15 for (T val = first; val != null; val = parent(val))
16 {
17 hashSet.Add(val);
18 }
19 for (T val2 = second; val2 != null; val2 = parent(val2))
20 {
22 {
23 return val2;
24 }
25 }
26 return null;
27 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), and System.Collections.Generic.Dictionary< TKey, TValue >.Contains().