TomlStringStyleAttribute Class
Overrides string formatting for a string member.
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class TomlStringStyleAttribute : TomlAttribute- Inheritance
TomlAttributeTomlStringStyleAttribute
Constructors
| Name | Description |
|---|---|
| TomlStringStyleAttribute(TomlStringStyle) | Initializes a new instance of the TomlStringStyleAttribute class. |
TomlStringStyleAttribute(TomlStringStyle)
TomlStringStyleAttribute.csInitializes a new instance of the TomlStringStyleAttribute class.
public TomlStringStyleAttribute(TomlStringStyle style)Parameters
styleTomlStringStyle- The preferred string style.
Properties
| Name | Description |
|---|---|
| AllowHexEscapes | Gets or sets whether control characters up to U+00FF are escaped with the TOML 1.1 \xHH and \e escapes instead of \uXXXX. |
| PreferLiteralWhenNoEscapes | Gets or sets whether literal strings should be preferred when no escaping is required. |
| Style | Gets the preferred string style. |
AllowHexEscapes
TomlStringStyleAttribute.csGets or sets whether control characters up to U+00FF are escaped with the TOML 1.1 \xHH and \e escapes instead of \uXXXX.
public TomlBooleanPreference AllowHexEscapes { get; set; }PreferLiteralWhenNoEscapes
TomlStringStyleAttribute.csGets or sets whether literal strings should be preferred when no escaping is required.
public TomlBooleanPreference PreferLiteralWhenNoEscapes { get; set; }