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
stream
StreamThe stream to write to.
dialect
TabularDialectThe dialect to use for writing.
options
TabularOptionsThe options to control the behavior during writing.
Exceptions
- ArgumentException
stream
does not support writing.- ArgumentNullException
stream
ordialect
is 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
cancellationToken
CancellationTokenThe 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
value
ReadOnlySpan<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
value
ReadOnlyMemory<char>A ReadOnlyMemory<T> instance to write.
cancellationToken
CancellationTokenThe 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
value
stringA string instance to write.
cancellationToken
CancellationTokenThe 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
value
TT
value to write.converter
TabularConverter<T>The converter to format the value with.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
- ValueTask
A task object.
Type Parameters
T
The 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
converter
is 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
value
byte[]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
value
byte[]An array of bytes to write.
cancellationToken
CancellationTokenThe 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
value
byte[]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
value
byte[]An array of bytes to write.
cancellationToken
CancellationTokenThe 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
value
BigIntegerA 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
value
BigIntegerA BigInteger value to write.
cancellationToken
CancellationTokenThe 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
value
boolA bool value to write.
cancellationToken
CancellationTokenThe 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
value
byteA byte value to write.
cancellationToken
CancellationTokenThe 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
value
charA char value to write.
cancellationToken
CancellationTokenThe 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
value
DateOnlyA DateOnly value to write.
cancellationToken
CancellationTokenThe 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
value
DateTimeA DateTime value to write.
cancellationToken
CancellationTokenThe 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
value
DateTimeOffsetA 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
value
DateTimeOffsetA DateTimeOffset value to write.
cancellationToken
CancellationTokenThe 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
value
decimalA decimal value to write.
cancellationToken
CancellationTokenThe 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
value
doubleA double value to write.
cancellationToken
CancellationTokenThe 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
cancellationToken
CancellationTokenThe 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
value
GuidA Guid value to write.
cancellationToken
CancellationTokenThe 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
value
HalfA Half value to write.
cancellationToken
CancellationTokenThe 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
value
Int128An Int128 value to write.
cancellationToken
CancellationTokenThe 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
value
shortA short value to write.
cancellationToken
CancellationTokenThe 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
value
intAn int value to write.
cancellationToken
CancellationTokenThe 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
value
longA long value to write.
cancellationToken
CancellationTokenThe 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
value
sbyteA sbyte value to write.
cancellationToken
CancellationTokenThe 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
value
floatA float value to write.
cancellationToken
CancellationTokenThe 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
value
ReadOnlySpan<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
value
ReadOnlyMemory<char>A ReadOnlyMemory<T> instance to write.
cancellationToken
CancellationTokenThe 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
value
stringA string instance to write.
cancellationToken
CancellationTokenThe 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
value
TimeOnlyA TimeOnly value to write.
cancellationToken
CancellationTokenThe 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
value
TimeSpanA TimeSpan value to write.
cancellationToken
CancellationTokenThe 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
value
UInt128An UInt128 value to write.
cancellationToken
CancellationTokenThe 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
value
ushortAn ushort value to write.
cancellationToken
CancellationTokenThe 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
value
uintAn uint value to write.
cancellationToken
CancellationTokenThe 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
value
ulongAn ulong value to write.
cancellationToken
CancellationTokenThe 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
value
UriAn 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
value
UriAn System.Uri instance to write.
cancellationToken
CancellationTokenThe 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
value
TT
value to write.converter
TabularConverter<T>The converter to format the value with.
Type Parameters
T
The type of the value to write.
Exceptions
- ArgumentException
The formatted value exceeds the supported field length.
- ArgumentNullException
converter
is null.