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

◆ TryReadAll() [2/2]

static int System.Reflection.Internal.StreamExtensions.TryReadAll ( this Stream stream,
Span< byte > buffer )
inlinestaticpackage

Definition at line 42 of file StreamExtensions.cs.

43 {
44 int i;
45 int num;
46 for (i = 0; i < buffer.Length; i += num)
47 {
48 num = stream.Read(buffer.Slice(i));
49 if (num == 0)
50 {
51 break;
52 }
53 }
54 return i;
55 }

References System.buffer, and System.stream.