YamlCommentAttribute class
Writes a comment above the member in block style, one # line per line of YamlCommentAttribute.Comment, as YamlDotNet's [YamlMember(Description = …)]. The comment is written for a null member too, and not for a member left out by an ignore condition; it is dropped in JSON-compatible style, and comments are skipped when reading.
Namespace: System.Text.Yaml.Serialization · Assembly: Styml.dll
public sealed class YamlCommentAttribute : YamlAttribute
Inheritance: object → Attribute → YamlAttribute → YamlCommentAttribute
Writes a comment above the member in block style, one # line per line of YamlCommentAttribute.Comment, as YamlDotNet's [YamlMember(Description = …)]. The comment is written for a null member too, and not for a member left out by an ignore condition; it is dropped in JSON-compatible style, and comments are skipped when reading.
RemarksLink to this heading
The text holds printable characters and tabs; its lines are separated by CR, LF or CRLF. Another line break (NEL, LS, PS) or a control character is an InvalidOperationException when the contract is configured, since a reader could take what follows it as content.
ConstructorsLink to this heading
Initializes a new instance of YamlCommentAttribute with the comment's text.
public YamlCommentAttribute(string comment);
Parameters
comment: The comment's text.
PropertiesLink to this heading
CommentLink to this heading
The comment's text.
public string Comment { get; }