Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ImmutableListBuilderDebuggerProxy.cs
Go to the documentation of this file.
2
4
5internal sealed class ImmutableListBuilderDebuggerProxy<T>
6{
7 private readonly ImmutableList<T>.Builder _list;
8
9 private T[] _cachedContents;
10
11 [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
12 public T[] Contents
13 {
14 get
15 {
16 if (_cachedContents == null)
17 {
18 _cachedContents = _list.ToArray(_list.Count);
19 }
20 return _cachedContents;
21 }
22 }
23
25 {
26 Requires.NotNull(builder, "builder");
27 _list = builder;
28 }
29}