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

◆ Read() [3/3]

virtual int System.IO.TextReader.Read ( Span< char > buffer)
inlinevirtualinherited

Reimplemented in System.IO.StreamReader, and System.IO.StringReader.

Definition at line 193 of file TextReader.cs.

194 {
195 char[] array = ArrayPool<char>.Shared.Rent(buffer.Length);
196 try
197 {
198 int num = Read(array, 0, buffer.Length);
199 if ((uint)num > (uint)buffer.Length)
200 {
201 throw new IOException(SR.IO_InvalidReadLength);
202 }
203 new Span<char>(array, 0, num).CopyTo(buffer);
204 return num;
205 }
206 finally
207 {
209 }
210 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
virtual int Read()

References System.array, System.buffer, System.Span< T >.CopyTo(), System.SR.IO_InvalidReadLength, System.IO.TextReader.Read(), and System.Buffers.ArrayPool< T >.Shared.