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

◆ TopoSort()

Terraria.ModLoader.TopoSort< T >.TopoSort ( IEnumerable< T > elements,
Func< T, IEnumerable< T > > dependencies = null,
Func< T, IEnumerable< T > > dependents = null )
inline

Definition at line 39 of file TopoSort.cs.

40 {
41 list = elements.ToList().AsReadOnly();
42 if (dependencies != null)
43 {
44 foreach (T t2 in list)
45 {
46 foreach (T dependency in dependencies(t2))
47 {
49 }
50 }
51 }
52 if (dependents == null)
53 {
54 return;
55 }
56 foreach (T t in list)
57 {
58 foreach (T dependent in dependents(t))
59 {
61 }
62 }
63 }
void AddEntry(T dependency, T dependent)
Definition TopoSort.cs:65
readonly ReadOnlyCollection< T > list
Definition TopoSort.cs:33

References Terraria.ModLoader.TopoSort< T >.AddEntry(), and Terraria.ModLoader.TopoSort< T >.list.

+ Here is the call graph for this function: