Class IniWriter
A writer for the simple INI format.
public class IniWriter : BaseKeyValueWriter
- Inheritance
-
IniWriter
- 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
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
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
Methods
ShouldWriteReference(TranslationEntry)
Determines whether the entry should be written as a reference to another entry (@ followed by the reference) rather than as text.
protected override bool ShouldWriteReference(TranslationEntry entry)
Parameters
entryTranslationEntryThe entry to be written.
Returns
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
keystringThe key (within the current section).
valuestringThe value.
stringBuilderStringBuilderThe 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
keystringThe name of the section.
stringBuilderStringBuilderThe builder of the file.