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

◆ CopyTo() [2/2]

void System.Net.MultiMemory.CopyTo ( Span< byte > destination)
inline

Definition at line 64 of file MultiMemory.cs.

65 {
66 if (destination.Length < _length)
67 {
68 throw new ArgumentOutOfRangeException("destination");
69 }
70 int blockCount = BlockCount;
71 for (int i = 0; i < blockCount; i++)
72 {
73 Memory<byte> block = GetBlock(i);
74 block.Span.CopyTo(destination);
75 destination = destination.Slice(block.Length);
76 }
77 }
readonly uint _length
Memory< byte > GetBlock(int blockIndex)

References System.Net.MultiMemory._length, System.Net.MultiMemory.BlockCount, System.destination, System.Net.MultiMemory.GetBlock(), System.Memory< T >.Length, and System.Memory< T >.Span.