InputSource Class
public abstract class InputSourceNo documentation is available.
Methods
| Name | Description |
|---|---|
| FromBytes(ReadOnlyMemory<byte>) | |
| FromFile(string) | |
| FromProcessPipe(ProcessPipe) | |
| FromStream(Stream) | |
| FromText(string) | |
| FromTextReader(TextReader) | |
| Read(byte[]) | |
| ReadAsync(Memory<byte>, CancellationToken) | Reads the next bytes of the input without blocking the calling thread when the source can be read asynchronously, which is the case of streams, files and ProcessPipe. |
FromBytes(ReadOnlyMemory<byte>)
InputSource.cspublic static InputSource FromBytes(ReadOnlyMemory<byte> bytes)No documentation is available.
FromFile(string)
InputSource.cspublic static InputSource FromFile(string path)No documentation is available.
FromProcessPipe(ProcessPipe)
InputSource.cspublic static InputSource FromProcessPipe(ProcessPipe processPipe)No documentation is available.
FromStream(Stream)
InputSource.cspublic static InputSource FromStream(Stream stream)No documentation is available.
FromText(string)
InputSource.cspublic static InputSource FromText(string text)No documentation is available.
FromTextReader(TextReader)
InputSource.cspublic static InputSource FromTextReader(TextReader reader)No documentation is available.
Read(byte[])
ReadAsync(Memory<byte>, CancellationToken)
Reads the next bytes of the input without blocking the calling thread when the source can be read asynchronously, which is the case of streams, files and ProcessPipe.
public abstract ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)Parameters
bufferMemory<byte>- The buffer to fill.
cancellationTokenCancellationToken- A cancellation token.
Returns
ValueTask<int> The number of bytes read, or 0 at the end of the input.
Operators
op_Implicit overloads
implicit operator InputSource(byte[])
InputSource.cspublic static implicit operator InputSource(byte[] bytes)No documentation is available.
implicit operator InputSource(Stream)
InputSource.cspublic static implicit operator InputSource(Stream stream)No documentation is available.
implicit operator InputSource(TextReader)
InputSource.cspublic static implicit operator InputSource(TextReader reader)No documentation is available.
implicit operator InputSource(ReadOnlyMemory<byte>)
InputSource.cspublic static implicit operator InputSource(ReadOnlyMemory<byte> bytes)No documentation is available.
implicit operator InputSource(string)
InputSource.cspublic static implicit operator InputSource(string text)No documentation is available.