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

◆ AppendChunk()

void System.IO.ChunkedMemoryStream.AppendChunk ( long count)
inlineprivate

Definition at line 110 of file ChunkedMemoryStream.cs.

111 {
112 int num = ((_currentChunk != null) ? (_currentChunk._buffer.Length * 2) : 1024);
113 if (count > num)
114 {
115 num = (int)Math.Min(count, 1048576L);
116 }
117 MemoryChunk memoryChunk = new MemoryChunk(num);
118 if (_currentChunk == null)
119 {
120 _headChunk = (_currentChunk = memoryChunk);
121 return;
122 }
123 _currentChunk._next = memoryChunk;
124 _currentChunk = memoryChunk;
125 }

References System.IO.ChunkedMemoryStream.MemoryChunk._buffer, System.IO.ChunkedMemoryStream._currentChunk, System.IO.ChunkedMemoryStream._headChunk, System.count, System.L, and System.Math.Min().

Referenced by System.IO.ChunkedMemoryStream.SetLength(), and System.IO.ChunkedMemoryStream.Write().