Class ReaderTokenStream
An ITokenStream<TToken> implementation based on a TextReader.
Inheritance
- object
- ReaderTokenStream
Implements
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Declaration
public class ReaderTokenStream : ITokenStream<char>
Constructors
ReaderTokenStream(TextReader)
Creates an ITokenStream<TToken> implementation based on a TextReader.
Declaration
public ReaderTokenStream(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
input |
The TextReader. |
Properties
ChunkSizeHint
Returns 4096.
Declaration
public int ChunkSizeHint { get; }
Property Value
Type | Description |
---|---|
Methods
Read(Span<char>)
Read up to buffer.Length
tokens into buffer
.
Return the actual number of tokens read, which may be fewer than
the size of the buffer if the stream has reached the end.
Declaration
public int Read(Span<char> buffer)
Parameters
Type | Name | Description |
---|---|---|
buffer |
The buffer to read tokens into. |
Returns
Type | Description |
---|---|
The actual number of tokens read. |