TomlStringStylePreferences Class

Configures string scalar style preferences for TOML serialization.

public sealed class TomlStringStylePreferences : IEquatable<TomlStringStylePreferences>
Implements

Constructors

NameDescription
TomlStringStylePreferences()

TomlStringStylePreferences()

public TomlStringStylePreferences()

No documentation is available.

Properties

NameDescription
AllowHexEscapesIf true, control characters up to U+00FF are escaped with the TOML 1.1 \xHH and \e escapes. Otherwise, they are escaped with \uXXXX, which TOML 1.0 readers also accept. Keys use this option too.
DefaultStylePreferred default string style.
PreferLiteralWhenNoEscapesIf true, prefer literal strings when no escaping is required.

If true, control characters up to U+00FF are escaped with the TOML 1.1 \xHH and \e escapes. Otherwise, they are escaped with \uXXXX, which TOML 1.0 readers also accept. Keys use this option too.

public bool AllowHexEscapes { get; init; }

Property value

bool

Preferred default string style.

public TomlStringStyle DefaultStyle { get; init; }

Property value

TomlStringStyle

Exceptions

ArgumentOutOfRangeException
Value is not a defined TomlStringStyle.

PreferLiteralWhenNoEscapes

TomlStringStylePreferences.cs

If true, prefer literal strings when no escaping is required.

public bool PreferLiteralWhenNoEscapes { get; init; }

Property value

bool

Methods

NameDescription
Equals(TomlStringStylePreferences?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(TomlStringStylePreferences?)

public bool Equals(TomlStringStylePreferences? other)
Parameters
other TomlStringStylePreferences?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(TomlStringStylePreferences?, TomlStringStylePreferences?)
operator !=(TomlStringStylePreferences?, TomlStringStylePreferences?)

operator ==(TomlStringStylePreferences?, TomlStringStylePreferences?)

public static bool operator ==(TomlStringStylePreferences? left, TomlStringStylePreferences? right)

No documentation is available.

operator !=(TomlStringStylePreferences?, TomlStringStylePreferences?)

public static bool operator !=(TomlStringStylePreferences? left, TomlStringStylePreferences? right)

No documentation is available.