TomlWriter Class
Writes TOML tokens for use by TomlConverter implementations.
public sealed class TomlWriterConstructors
| Name | Description |
|---|---|
| TomlWriter(TextWriter, TomlSerializerOptions?) | Initializes a new instance of the TomlWriter class. |
TomlWriter(TextWriter, TomlSerializerOptions?)
TomlWriter.csInitializes a new instance of the TomlWriter class.
public TomlWriter(TextWriter writer, TomlSerializerOptions? options = null)Parameters
writerTextWriteroptionsTomlSerializerOptions?
Properties
| Name | Description |
|---|---|
| Options | Gets the options instance used by this writer. |
Options
TomlWriter.csGets the options instance used by this writer.
public TomlSerializerOptions Options { get; }Property value
Methods
| Name | Description |
|---|---|
| WriteBooleanValue(bool) | Writes a boolean value. |
| WriteDateTimeValue(TomlDateTime) | Writes a TOML date/time value. |
| WriteEndArray() | Writes the end of an array value. |
| WriteEndDocument() | Writes the end of a TOML document. |
| WriteEndInlineTable() | Writes the end of an inline table value. |
| WriteEndTable() | Writes the end of a table value. |
| WriteEndTableArray() | Writes the end of an array-of-tables value. |
| WriteFloatValue(double) | Writes a floating point value. |
| WriteFloatValue(float) | Writes a single-precision floating point value with its own round-trip formatting. |
| WriteIntegerValue(long) | Writes an integer value. |
| WritePropertyName(string) | Writes a property name within the current table context. |
| WriteStartArray() | Writes the start of an array value. |
| WriteStartDocument() | Writes the start of a TOML document. |
| WriteStartInlineTable() | Writes the start of an inline table value. |
| WriteStartTable() | Writes the start of a table value. |
| WriteStartTableArray() | Writes the start of an array-of-tables value. |
| WriteStringValue(string) | Writes a string value. |
WriteBooleanValue(bool)
TomlWriter.csWriteDateTimeValue(TomlDateTime)
TomlWriter.csWrites a TOML date/time value.
public void WriteDateTimeValue(TomlDateTime value)Parameters
valueTomlDateTime- The value.
WriteEndArray()
TomlWriter.csWrites the end of an array value.
public void WriteEndArray()WriteEndDocument()
TomlWriter.csWrites the end of a TOML document.
public void WriteEndDocument()WriteEndInlineTable()
TomlWriter.csWrites the end of an inline table value.
public void WriteEndInlineTable()WriteEndTable()
TomlWriter.csWrites the end of a table value.
public void WriteEndTable()WriteEndTableArray()
TomlWriter.csWrites the end of an array-of-tables value.
public void WriteEndTableArray()WriteIntegerValue(long)
TomlWriter.csWritePropertyName(string)
TomlWriter.csWriteStartArray()
TomlWriter.csWrites the start of an array value.
public void WriteStartArray()WriteStartDocument()
TomlWriter.csWrites the start of a TOML document.
public void WriteStartDocument()WriteStartInlineTable()
TomlWriter.csWrites the start of an inline table value.
public void WriteStartInlineTable()WriteStartTable()
TomlWriter.csWrites the start of a table value.
public void WriteStartTable()WriteStartTableArray()
TomlWriter.csWrites the start of an array-of-tables value.
public void WriteStartTableArray()Remarks
This method writes an array container whose elements must be tables.