YamlScalarStyleAttribute class

The scalar style in which the member's string value is written in block style, as YamlDotNet's [YamlMember(ScalarStyle = …)].

Namespace: System.Text.Yaml.Serialization · Assembly: Styml.dll

public sealed class YamlScalarStyleAttribute : YamlAttribute

Inheritance: object → Attribute → YamlAttribute → YamlScalarStyleAttribute

The scalar style in which the member's string value is written in block style, as YamlDotNet's [YamlMember(ScalarStyle = …)].

RemarksLink to this heading

The style applies to the member's own value when it is written as a string (a string, a character, a date, a Guid, an enum written as its name…), where that style holds the value and reads back as the same string; otherwise the writer's default choice is written, so the value never reads differently. It does not reach a number, a boolean or a null, a collection's items, a nested object, or keys, and it is ignored in JSON-compatible style.

ConstructorsLink to this heading

Initializes a new instance of YamlScalarStyleAttribute with the style.

public YamlScalarStyleAttribute(YamlScalarStyle style);

Parameters

PropertiesLink to this heading

StyleLink to this heading

The scalar style.

public YamlScalarStyle Style { get; }

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close