Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
KeyedStack.cs
Go to the documentation of this file.
2
4
5internal sealed class KeyedStack<TKey, TValue> where TValue : class
6{
8
9 internal void Push(TKey key, TValue value)
10 {
12 {
14 }
15 value2.Push(value);
16 }
17
18 internal TValue TryPop(TKey key)
19 {
20 if (!_data.TryGetValue(key, out var value) || !value.TryPop(out var result))
21 {
22 return null;
23 }
24 return result;
25 }
26}
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
readonly Dictionary< TKey, Stack< TValue > > _data
Definition KeyedStack.cs:7
void Push(TKey key, TValue value)
Definition KeyedStack.cs:9