Class StringBuilderReader
Represents a reads from a .
Inheritance
System.Object
StringBuilderReader
Assembly: X10D.dll
Syntax
public class StringBuilderReader : TextReader
Constructors
|
Improve this Doc
View Source
StringBuilderReader(StringBuilder)
Declaration
public StringBuilderReader(StringBuilder stringBuilder)
Parameters
Type |
Name |
Description |
StringBuilder |
stringBuilder |
The to wrap.
|
Methods
|
Improve this Doc
View Source
Close()
Declaration
public override void Close()
|
Improve this Doc
View Source
Peek()
Declaration
public override int Peek()
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Read()
Declaration
public override int Read()
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Read(Span<Char>)
Declaration
public override int Read(Span<char> buffer)
Parameters
Type |
Name |
Description |
Span<System.Char> |
buffer |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Read(Char[], Int32, Int32)
Declaration
public override int Read(char[] buffer, int index, int count)
Parameters
Type |
Name |
Description |
System.Char[] |
buffer |
|
System.Int32 |
index |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ReadAsync(Memory<Char>, CancellationToken)
Asynchronously reads the characters from the current stream into a memory block.
Declaration
public override ValueTask<int> ReadAsync(Memory<char> buffer, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
Memory<System.Char> |
buffer |
When this method returns, contains the specified memory block of characters replaced by the characters read from the
current source.
|
CancellationToken |
cancellationToken |
Ignored.
|
Returns
Type |
Description |
ValueTask<System.Int32> |
A value task that represents the asynchronous read operation. The value of the type parameter contains the number of
characters that have been read, or 0 if at the end of the stream and no data was read. The number will be less than or
equal to the buffer length, depending on whether the data is available within the stream.
|
|
Improve this Doc
View Source
ReadAsync(Char[], Int32, Int32)
Declaration
public override Task<int> ReadAsync(char[] buffer, int index, int count)
Parameters
Type |
Name |
Description |
System.Char[] |
buffer |
|
System.Int32 |
index |
|
System.Int32 |
count |
|
Returns
Type |
Description |
Task<System.Int32> |
|
|
Improve this Doc
View Source
ReadBlock(Span<Char>)
Declaration
public override int ReadBlock(Span<char> buffer)
Parameters
Type |
Name |
Description |
Span<System.Char> |
buffer |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ReadBlock(Char[], Int32, Int32)
Declaration
public override int ReadBlock(char[] buffer, int index, int count)
Parameters
Type |
Name |
Description |
System.Char[] |
buffer |
|
System.Int32 |
index |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ReadBlockAsync(Memory<Char>, CancellationToken)
Asynchronously reads the characters from the current stream and writes the data to a buffer.
Declaration
public override ValueTask<int> ReadBlockAsync(Memory<char> buffer, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
Memory<System.Char> |
buffer |
When this method returns, contains the specified memory block of characters replaced by the characters read from the
current source.
|
CancellationToken |
cancellationToken |
Ignored.
|
Returns
Type |
Description |
ValueTask<System.Int32> |
A value task that represents the asynchronous read operation. The value of the type parameter contains the total
number of characters read into the buffer. The result value can be less than the number of characters requested if the
number of characters currently available is less than the requested number, or it can be 0 (zero) if the end of the
stream has been reached.
|
|
Improve this Doc
View Source
ReadBlockAsync(Char[], Int32, Int32)
Declaration
public override Task<int> ReadBlockAsync(char[] buffer, int index, int count)
Parameters
Type |
Name |
Description |
System.Char[] |
buffer |
|
System.Int32 |
index |
|
System.Int32 |
count |
|
Returns
Type |
Description |
Task<System.Int32> |
|
|
Improve this Doc
View Source
ReadLine()
Declaration
public override string? ReadLine()
Returns
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
ReadLineAsync()
Declaration
public override Task<string?> ReadLineAsync()
Returns
Type |
Description |
Task<System.Nullable<System.String>> |
|
|
Improve this Doc
View Source
ReadToEnd()
Declaration
public override string ReadToEnd()
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ReadToEndAsync()
Declaration
public override Task<string> ReadToEndAsync()
Returns
Type |
Description |
Task<System.String> |
|
Extension Methods