Class PgWriter
public sealed class PgWriter
- Inheritance
-
PgWriter
- Inherited Members
Properties
Current
public ValueMetadata Current { get; }
Property Value
Methods
BeginNestedWrite(Size, int, object?)
public NestedWriteScope BeginNestedWrite(Size bufferRequirement, int byteCount, object? state)
Parameters
Returns
BeginNestedWriteAsync(Size, int, object?, CancellationToken)
public ValueTask<NestedWriteScope> BeginNestedWriteAsync(Size bufferRequirement, int byteCount, object? state, CancellationToken cancellationToken = default)
Parameters
bufferRequirement
SizebyteCount
intstate
objectcancellationToken
CancellationToken
Returns
Flush(TimeSpan)
public void Flush(TimeSpan timeout = default)
Parameters
timeout
TimeSpan
FlushAsync(CancellationToken)
public ValueTask FlushAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
GetStream(bool)
Gets a Stream that can be used to write to the underlying buffer.
public Stream GetStream(bool allowMixedIO = false)
Parameters
allowMixedIO
boolBlocking flushes during writes that were expected to be non-blocking and vice versa cause an exception to be thrown unless allowMixedIO is set to true, false by default.
Returns
- Stream
The stream.
ShouldFlush(Size)
public bool ShouldFlush(Size bufferRequirement)
Parameters
bufferRequirement
Size
Returns
ShouldFlush(int)
public bool ShouldFlush(int byteCount)
Parameters
byteCount
int
Returns
WriteAsOid(PgTypeId)
public void WriteAsOid(PgTypeId pgTypeId)
Parameters
pgTypeId
PgTypeId
WriteByte(byte)
public void WriteByte(byte value)
Parameters
value
byte
WriteBytes(ReadOnlySpan<byte>)
public void WriteBytes(ReadOnlySpan<byte> buffer)
Parameters
buffer
ReadOnlySpan<byte>
WriteBytesAsync(ReadOnlyMemory<byte>, CancellationToken)
public ValueTask WriteBytesAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
Parameters
buffer
ReadOnlyMemory<byte>cancellationToken
CancellationToken
Returns
WriteChars(ReadOnlySpan<char>, Encoding)
public void WriteChars(ReadOnlySpan<char> data, Encoding encoding)
Parameters
data
ReadOnlySpan<char>encoding
Encoding
WriteCharsAsync(ReadOnlyMemory<char>, Encoding, CancellationToken)
public ValueTask WriteCharsAsync(ReadOnlyMemory<char> data, Encoding encoding, CancellationToken cancellationToken = default)
Parameters
data
ReadOnlyMemory<char>encoding
EncodingcancellationToken
CancellationToken
Returns
WriteDouble(double)
public void WriteDouble(double value)
Parameters
value
double
WriteFloat(float)
public void WriteFloat(float value)
Parameters
value
float
WriteInt16(short)
public void WriteInt16(short value)
Parameters
value
short
WriteInt32(int)
public void WriteInt32(int value)
Parameters
value
int
WriteInt64(long)
public void WriteInt64(long value)
Parameters
value
long
WriteUInt16(ushort)
public void WriteUInt16(ushort value)
Parameters
value
ushort
WriteUInt32(uint)
public void WriteUInt32(uint value)
Parameters
value
uint
WriteUInt64(ulong)
public void WriteUInt64(ulong value)
Parameters
value
ulong