Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CollectionsMarshal.cs
Go to the documentation of this file.
2
4
5public static class CollectionsMarshal
6{
7 public static Span<T> AsSpan<T>(List<T>? list)
8 {
9 if (list != null)
10 {
11 return new Span<T>(list._items, 0, list._size);
12 }
13 return default(Span<T>);
14 }
15
20
25}
static ref TValue GetValueRefOrAddDefault(Dictionary< TKey, TValue > dictionary, TKey key, out bool exists)
Definition Dictionary.cs:17
static Span< T > AsSpan< T >(List< T >? list)
static ref TValue GetValueRefOrNullRef< TKey, TValue >(Dictionary< TKey, TValue > dictionary, TKey key)
static ref? TValue GetValueRefOrAddDefault< TKey, TValue >(Dictionary< TKey, TValue > dictionary, TKey key, out bool exists)