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

◆ GetId< T >()

static int System.Linq.Expressions.DebugViewWriter.GetId< T > ( T e,
ref Dictionary< T, int > ids )
inlinestaticprivate

Definition at line 74 of file DebugViewWriter.cs.

75 {
76 if (ids == null)
77 {
78 ids = new Dictionary<T, int>();
79 ids.Add(e, 1);
80 return 1;
81 }
82 if (!ids.TryGetValue(e, out var value))
83 {
84 value = ids.Count + 1;
85 ids.Add(e, value);
86 }
87 return value;
88 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)

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