Table of Contents

Class TomlWriter

Namespace
Tlumach.Writers
Assembly
Tlumach.Writers.dll

A writer for the TOML format.

public class TomlWriter : BaseKeyValueWriter
Inheritance
TomlWriter
Inherited Members

Properties

ConfigExtension

Gets the extension of the configuration files of the format, with the leading dot (e.g., ".jsoncfg"), or an empty string if the writer does not write configuration files.

public override string ConfigExtension { get; }

Property Value

string

FormatName

Gets the name of the format (e.g., "JSON" or "RESX"), which is also used in error messages.

public override string FormatName { get; }

Property Value

string

TranslationExtension

Gets the extension of the translation files of the format, with the leading dot (e.g., ".json").

public override string TranslationExtension { get; }

Property Value

string

Methods

WriteKeyValueLine(string, string, StringBuilder)

Appends a line with a key and its value to the file being written, quoting and escaping them as the format requires.

protected override void WriteKeyValueLine(string key, string value, StringBuilder stringBuilder)

Parameters

key string

The key (within the current section).

value string

The value.

stringBuilder StringBuilder

The builder of the file.

WriteSection(string, StringBuilder)

Appends the header of a section to the file being written.

protected override void WriteSection(string key, StringBuilder stringBuilder)

Parameters

key string

The name of the section.

stringBuilder StringBuilder

The builder of the file.