Class TabularWriter
Provides forward-only, write-only access to tabular data fields. This class cannot be inherited.
public sealed class TabularWriter : IDisposable, IAsyncDisposable
- Inheritance
-
TabularWriter
- Implements
Constructors
TabularWriter(Stream, TabularDialect, TabularOptions?)
Initializes a new instance of the TabularWriter class for the specified stream using the provided dialect and options.
public TabularWriter(Stream stream, TabularDialect dialect, TabularOptions? options = null)
Parameters
streamStreamThe stream to write to.
dialectTabularDialectThe dialect to use for writing.
optionsTabularOptionsThe options to control the behavior during writing.
Exceptions
- ArgumentException
streamdoes not support writing.- ArgumentNullException
streamordialectis null.
Properties
BytesCommitted
Gets the number of bytes committed so far.
public long BytesCommitted { get; }
Property Value
- long
A non-negative 64-bit signed integer.
Remarks
Might be greater than the number of bytes written to the underlying stream.
CurrentPositionType
Gets the type of the current writer position.
public TabularPositionType CurrentPositionType { get; }
Property Value
- TabularPositionType
A position type enumeration value.
FieldsWritten
Gets the number of fields written to the current record so far.
public long FieldsWritten { get; }
Property Value
- long
A non-negative 64-bit signed integer.
RecordsWritten
Gets the number of records written so far.
public long RecordsWritten { get; }
Property Value
- long
A non-negative 64-bit signed integer.
Methods
Dispose()
Releases the resources used by the current instance of the TabularWriter class.
public void Dispose()
DisposeAsync()
Asynchronously releases the resources used by the current instance of the TabularWriter class.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task object.
FinishRecord()
Instructs the writer to finish accepting fields for the current record.
public void FinishRecord()
Flush()
Writes any buffered data to the underlying stream.
public void Flush()
FlushAsync(CancellationToken)
Asynchronously writes any buffered data to the underlying stream.
public ValueTask FlushAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteAnnotation(ReadOnlySpan<char>)
Writes a character sequence as the next record with annotation.
public void WriteAnnotation(ReadOnlySpan<char> value)
Parameters
valueReadOnlySpan<char>A ReadOnlySpan<T> instance to write.
Exceptions
- ArgumentException
The value cannot be formatted into a character sequence or the formatted value exceeds the supported field length.
- InvalidOperationException
The current dialect does not support the operation.
WriteAnnotation(string?)
Writes a string instance as the next record with annotation.
public void WriteAnnotation(string? value)
Parameters
Exceptions
- ArgumentException
The value cannot be formatted into a character sequence or the formatted value exceeds the supported field length.
- InvalidOperationException
The current dialect does not support the operation.
WriteAnnotationAsync(ReadOnlyMemory<char>, CancellationToken)
Asynchronously writes a character sequence as the next record with annotation.
public ValueTask WriteAnnotationAsync(ReadOnlyMemory<char> value, CancellationToken cancellationToken = default)
Parameters
valueReadOnlyMemory<char>A ReadOnlyMemory<T> instance to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- ArgumentException
The value cannot be formatted into a character sequence or the formatted value exceeds the supported field length. This exception is stored into the returned task.
- InvalidOperationException
The current dialect does not support the operation. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteAnnotationAsync(string?, CancellationToken)
Asynchronously writes a string instance as the next record with annotation.
public ValueTask WriteAnnotationAsync(string? value, CancellationToken cancellationToken = default)
Parameters
valuestringA string instance to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- ArgumentException
The value cannot be formatted into a character sequence or the formatted value exceeds the supported field length. This exception is stored into the returned task.
- InvalidOperationException
The current dialect does not support the operation. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteAsync<T>(T?, TabularConverter<T>, CancellationToken)
Asynchronously writes T value as the next value field of the current record.
public ValueTask WriteAsync<T>(T? value, TabularConverter<T> converter, CancellationToken cancellationToken = default)
Parameters
valueTTvalue to write.converterTabularConverter<T>The converter to format the value with.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Type Parameters
TThe type of the value to write.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length. This exception is stored into the returned task.
- ArgumentNullException
converteris null.- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteBase16Binary(byte[]?)
Writes binary data encoded with "base16" ("hex") encoding as the next value field of the current record.
public void WriteBase16Binary(byte[]? value)
Parameters
valuebyte[]An array of bytes to write.
Remarks
The value will be formatted according to the RFC 4648.
Exceptions
- ArgumentException
The formatted field exceeds the supported field length.
WriteBase16BinaryAsync(byte[]?, CancellationToken)
Asynchronously writes binary data encoded with "base16" ("hex") encoding as the next value field of the current record.
public ValueTask WriteBase16BinaryAsync(byte[]? value, CancellationToken cancellationToken = default)
Parameters
valuebyte[]An array of bytes to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 4648.
Exceptions
- FormatException
The value cannot be formatted into a character sequence. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteBase64Binary(byte[]?)
Writes binary data encoded with "base64" encoding as the next value field of the current record.
public void WriteBase64Binary(byte[]? value)
Parameters
valuebyte[]An array of bytes to write.
Remarks
The value will be formatted according to the RFC 4648.
Exceptions
- ArgumentException
The formatted field exceeds the supported field length.
WriteBase64BinaryAsync(byte[]?, CancellationToken)
Asynchronously writes binary data encoded with "base64" encoding as the next value field of the current record.
public ValueTask WriteBase64BinaryAsync(byte[]? value, CancellationToken cancellationToken = default)
Parameters
valuebyte[]An array of bytes to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 4648.
Exceptions
- FormatException
The value cannot be formatted into a character sequence. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteBigInteger(BigInteger)
Writes a BigInteger value as the next value field of the current record.
public void WriteBigInteger(BigInteger value)
Parameters
valueBigIntegerA BigInteger value to write.
Exceptions
- ArgumentException
The formatted field exceeds the supported field length.
WriteBigIntegerAsync(BigInteger, CancellationToken)
Asynchronously writes a BigInteger value as the next value field of the current record.
public ValueTask WriteBigIntegerAsync(BigInteger value, CancellationToken cancellationToken = default)
Parameters
valueBigIntegerA BigInteger value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- FormatException
The value cannot be formatted into a character sequence. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteBoolean(bool)
Writes a bool value as the next value field of the current record.
public void WriteBoolean(bool value)
Parameters
Remarks
The value will be represented as one of the literals: "false", "true".
WriteBooleanAsync(bool, CancellationToken)
Asynchronously writes a bool value as the next value field of the current record.
public ValueTask WriteBooleanAsync(bool value, CancellationToken cancellationToken = default)
Parameters
valueboolA bool value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be represented as one of the literals: "false", "true".
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteByte(byte)
Writes a byte value as the next value field of the current record.
public void WriteByte(byte value)
Parameters
WriteByteAsync(byte, CancellationToken)
Asynchronously writes a byte value as the next value field of the current record.
public ValueTask WriteByteAsync(byte value, CancellationToken cancellationToken = default)
Parameters
valuebyteA byte value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteChar(char)
Writes a char value as the next value field of the current record.
public void WriteChar(char value)
Parameters
WriteCharAsync(char, CancellationToken)
Asynchronously writes a char value as the next value field of the current record.
public ValueTask WriteCharAsync(char value, CancellationToken cancellationToken = default)
Parameters
valuecharA char value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteDateOnly(DateOnly)
Writes a DateOnly value as the next value field of the current record.
public void WriteDateOnly(DateOnly value)
Parameters
Remarks
The value will be formatted according to the RFC 3339.
WriteDateOnlyAsync(DateOnly, CancellationToken)
Asynchronously writes a DateOnly value as the next value field of the current record.
public ValueTask WriteDateOnlyAsync(DateOnly value, CancellationToken cancellationToken = default)
Parameters
valueDateOnlyA DateOnly value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3339.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteDateTime(DateTime)
Writes a DateTime value as the next value field of the current record.
public void WriteDateTime(DateTime value)
Parameters
Remarks
The value will be formatted according to the RFC 3339.
WriteDateTimeAsync(DateTime, CancellationToken)
Asynchronously writes a DateTime value as the next value field of the current record.
public ValueTask WriteDateTimeAsync(DateTime value, CancellationToken cancellationToken = default)
Parameters
valueDateTimeA DateTime value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3339.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteDateTimeOffset(DateTimeOffset)
Writes a DateTimeOffset value as the next value field of the current record.
public void WriteDateTimeOffset(DateTimeOffset value)
Parameters
valueDateTimeOffsetA DateTimeOffset value to write.
Remarks
The value will be formatted according to the RFC 3339.
WriteDateTimeOffsetAsync(DateTimeOffset, CancellationToken)
Asynchronously writes a DateTimeOffset value as the next value field of the current record.
public ValueTask WriteDateTimeOffsetAsync(DateTimeOffset value, CancellationToken cancellationToken = default)
Parameters
valueDateTimeOffsetA DateTimeOffset value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3339.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteDecimal(decimal)
Writes a decimal value as the next value field of the current record.
public void WriteDecimal(decimal value)
Parameters
WriteDecimalAsync(decimal, CancellationToken)
Asynchronously writes a decimal value as the next value field of the current record.
public ValueTask WriteDecimalAsync(decimal value, CancellationToken cancellationToken = default)
Parameters
valuedecimalA decimal value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteDouble(double)
Writes a double value as the next value field of the current record.
public void WriteDouble(double value)
Parameters
WriteDoubleAsync(double, CancellationToken)
Asynchronously writes a double value as the next value field of the current record.
public ValueTask WriteDoubleAsync(double value, CancellationToken cancellationToken = default)
Parameters
valuedoubleA double value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteEmpty()
Writes an empty character sequence as the next value field of the current record.
public void WriteEmpty()
WriteEmptyAsync(CancellationToken)
Asynchronously writes an empty character sequence as the next value field of the current record.
public ValueTask WriteEmptyAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteGuid(Guid)
Writes a Guid value as the next value field of the current record.
public void WriteGuid(Guid value)
Parameters
Remarks
The value will be formatted according to the RFC 4122.
WriteGuidAsync(Guid, CancellationToken)
Asynchronously writes a Guid value as the next value field of the current record.
public ValueTask WriteGuidAsync(Guid value, CancellationToken cancellationToken = default)
Parameters
valueGuidA Guid value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 4122.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteHalf(Half)
Writes a Half value as the next value field of the current record.
public void WriteHalf(Half value)
Parameters
WriteHalfAsync(Half, CancellationToken)
Asynchronously writes a Half value as the next value field of the current record.
public ValueTask WriteHalfAsync(Half value, CancellationToken cancellationToken = default)
Parameters
valueHalfA Half value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteInt128(Int128)
Writes a Int128 value as the next value field of the current record.
public void WriteInt128(Int128 value)
Parameters
WriteInt128Async(Int128, CancellationToken)
Asynchronously writes a Int128 value as the next value field of the current record.
public ValueTask WriteInt128Async(Int128 value, CancellationToken cancellationToken = default)
Parameters
valueInt128An Int128 value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteInt16(short)
Writes a short value as the next value field of the current record.
public void WriteInt16(short value)
Parameters
WriteInt16Async(short, CancellationToken)
Asynchronously writes a short value as the next value field of the current record.
public ValueTask WriteInt16Async(short value, CancellationToken cancellationToken = default)
Parameters
valueshortA short value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteInt32(int)
Writes a int value as the next value field of the current record.
public void WriteInt32(int value)
Parameters
WriteInt32Async(int, CancellationToken)
Asynchronously writes a int value as the next value field of the current record.
public ValueTask WriteInt32Async(int value, CancellationToken cancellationToken = default)
Parameters
valueintAn int value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteInt64(long)
Writes a long value as the next value field of the current record.
public void WriteInt64(long value)
Parameters
WriteInt64Async(long, CancellationToken)
Asynchronously writes a long value as the next value field of the current record.
public ValueTask WriteInt64Async(long value, CancellationToken cancellationToken = default)
Parameters
valuelongA long value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteRune(Rune)
Writes a Rune value as the next value field of the current record.
public void WriteRune(Rune value)
Parameters
WriteRuneAsync(Rune, CancellationToken)
Asynchronously writes a Rune value as the next value field of the current record.
public ValueTask WriteRuneAsync(Rune value, CancellationToken cancellationToken = default)
Parameters
valueRuneA Rune value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteSByte(sbyte)
Writes a sbyte value as the next value field of the current record.
[CLSCompliant(false)]
public void WriteSByte(sbyte value)
Parameters
WriteSByteAsync(sbyte, CancellationToken)
Asynchronously writes a sbyte value as the next value field of the current record.
[CLSCompliant(false)]
public ValueTask WriteSByteAsync(sbyte value, CancellationToken cancellationToken = default)
Parameters
valuesbyteA sbyte value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteSingle(float)
Writes a float value as the next value field of the current record.
public void WriteSingle(float value)
Parameters
WriteSingleAsync(float, CancellationToken)
Asynchronously writes a float value as the next value field of the current record.
public ValueTask WriteSingleAsync(float value, CancellationToken cancellationToken = default)
Parameters
valuefloatA float value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteString(ReadOnlySpan<char>)
Writes a character sequence as the next value field of the current record.
public void WriteString(ReadOnlySpan<char> value)
Parameters
valueReadOnlySpan<char>A ReadOnlySpan<T> instance to write.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length.
WriteString(string?)
Writes a string instance as the next value field of the current record.
public void WriteString(string? value)
Parameters
Exceptions
- ArgumentException
The formatted value exceeds the supported field length.
WriteStringAsync(ReadOnlyMemory<char>, CancellationToken)
Asynchronously writes a character sequence as the next value field of the current record.
public ValueTask WriteStringAsync(ReadOnlyMemory<char> value, CancellationToken cancellationToken = default)
Parameters
valueReadOnlyMemory<char>A ReadOnlyMemory<T> instance to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteStringAsync(string?, CancellationToken)
Asynchronously writes a string instance as the next value field of the current record.
public ValueTask WriteStringAsync(string? value, CancellationToken cancellationToken = default)
Parameters
valuestringA string instance to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length. This exception is stored into the returned task.
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteTimeOnly(TimeOnly)
Writes a TimeOnly value as the next value field of the current record.
public void WriteTimeOnly(TimeOnly value)
Parameters
Remarks
The value will be formatted according to the RFC 3339.
WriteTimeOnlyAsync(TimeOnly, CancellationToken)
Asynchronously writes a TimeOnly value as the next value field of the current record.
public ValueTask WriteTimeOnlyAsync(TimeOnly value, CancellationToken cancellationToken = default)
Parameters
valueTimeOnlyA TimeOnly value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3339.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteTimeSpan(TimeSpan)
Writes a TimeSpan value as the next value field of the current record.
public void WriteTimeSpan(TimeSpan value)
Parameters
Remarks
The value will be formatted according to the RFC 3339.
WriteTimeSpanAsync(TimeSpan, CancellationToken)
Asynchronously writes a TimeSpan value as the next value field of the current record.
public ValueTask WriteTimeSpanAsync(TimeSpan value, CancellationToken cancellationToken = default)
Parameters
valueTimeSpanA TimeSpan value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3339.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteUInt128(UInt128)
Writes a UInt128 value as the next value field of the current record.
[CLSCompliant(false)]
public void WriteUInt128(UInt128 value)
Parameters
WriteUInt128Async(UInt128, CancellationToken)
Asynchronously writes a UInt128 value as the next value field of the current record.
[CLSCompliant(false)]
public ValueTask WriteUInt128Async(UInt128 value, CancellationToken cancellationToken = default)
Parameters
valueUInt128An UInt128 value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteUInt16(ushort)
Writes a ushort value as the next value field of the current record.
[CLSCompliant(false)]
public void WriteUInt16(ushort value)
Parameters
WriteUInt16Async(ushort, CancellationToken)
Asynchronously writes a ushort value as the next value field of the current record.
[CLSCompliant(false)]
public ValueTask WriteUInt16Async(ushort value, CancellationToken cancellationToken = default)
Parameters
valueushortAn ushort value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteUInt32(uint)
Writes a uint value as the next value field of the current record.
[CLSCompliant(false)]
public void WriteUInt32(uint value)
Parameters
WriteUInt32Async(uint, CancellationToken)
Asynchronously writes a uint value as the next value field of the current record.
[CLSCompliant(false)]
public ValueTask WriteUInt32Async(uint value, CancellationToken cancellationToken = default)
Parameters
valueuintAn uint value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteUInt64(ulong)
Writes a ulong value as the next value field of the current record.
[CLSCompliant(false)]
public void WriteUInt64(ulong value)
Parameters
WriteUInt64Async(ulong, CancellationToken)
Asynchronously writes a ulong value as the next value field of the current record.
[CLSCompliant(false)]
public ValueTask WriteUInt64Async(ulong value, CancellationToken cancellationToken = default)
Parameters
valueulongAn ulong value to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
WriteUri(Uri?)
Writes an System.Uri instance as the next value field of the current record.
public void WriteUri(Uri? value)
Parameters
valueUriAn System.Uri instance to write.
Remarks
The value will be formatted according to the RFC 3986.
WriteUriAsync(Uri?, CancellationToken)
Asynchronously writes an System.Uri instance as the next value field of the current record.
public ValueTask WriteUriAsync(Uri? value, CancellationToken cancellationToken = default)
Parameters
valueUriAn System.Uri instance to write.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Remarks
The value will be formatted according to the RFC 3986.
Exceptions
- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.
Write<T>(T?, TabularConverter<T>)
Writes T value as the next value field of the current record.
public void Write<T>(T? value, TabularConverter<T> converter)
Parameters
valueTTvalue to write.converterTabularConverter<T>The converter to format the value with.
Type Parameters
TThe type of the value to write.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length.
- ArgumentNullException
converteris null.