InputSource Class

public abstract class InputSource

No documentation is available.

Methods

NameDescription
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.cs
public static InputSource FromBytes(ReadOnlyMemory<byte> bytes)

Parameters

bytes ReadOnlyMemory<byte>

Returns

InputSource

No documentation is available.

FromFile(string)

InputSource.cs
public static InputSource FromFile(string path)

Parameters

path string

Returns

InputSource

No documentation is available.

FromProcessPipe(ProcessPipe)

InputSource.cs
public static InputSource FromProcessPipe(ProcessPipe processPipe)

Parameters

processPipe ProcessPipe

Returns

InputSource

No documentation is available.

FromStream(Stream)

InputSource.cs
public static InputSource FromStream(Stream stream)

Parameters

stream Stream

Returns

InputSource

No documentation is available.

FromText(string)

InputSource.cs
public static InputSource FromText(string text)

Parameters

text string

Returns

InputSource

No documentation is available.

FromTextReader(TextReader)

InputSource.cs
public static InputSource FromTextReader(TextReader reader)

Parameters

reader TextReader

Returns

InputSource

No documentation is available.

Read(byte[])

public abstract int Read(byte[] buffer)

Parameters

buffer byte[]

Returns

int

No documentation is available.

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

buffer Memory<byte>
The buffer to fill.
cancellationToken CancellationToken
A cancellation token.

Returns

ValueTask<int> The number of bytes read, or 0 at the end of the input.

Operators

NameDescription
implicit operator InputSource(byte[])
implicit operator InputSource(Stream)
implicit operator InputSource(TextReader)
implicit operator InputSource(ReadOnlyMemory<byte>)
implicit operator InputSource(string)

op_Implicit overloads

implicit operator InputSource(byte[])

InputSource.cs
public static implicit operator InputSource(byte[] bytes)
Parameters
bytes byte[]
Returns

InputSource

No documentation is available.

implicit operator InputSource(Stream)

InputSource.cs
public static implicit operator InputSource(Stream stream)
Parameters
stream Stream
Returns

InputSource

No documentation is available.

implicit operator InputSource(TextReader)

InputSource.cs
public static implicit operator InputSource(TextReader reader)
Parameters
reader TextReader
Returns

InputSource

No documentation is available.

implicit operator InputSource(ReadOnlyMemory<byte>)

InputSource.cs
public static implicit operator InputSource(ReadOnlyMemory<byte> bytes)
Parameters
bytes ReadOnlyMemory<byte>
Returns

InputSource

No documentation is available.

implicit operator InputSource(string)

InputSource.cs
public static implicit operator InputSource(string text)
Parameters
text string
Returns

InputSource

No documentation is available.