Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlDocumentPartFluent

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Modifiers
static

The fluent methods of YamlDocumentPart, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

Inheritance

  • object
  • YamlDocumentPartFluent

Methods

public static YamlDocumentPart LeadingComment(YamlDocumentPart yamlDocumentPart, string? text) #

Replaces the header comments; each line of text becomes one # line comment. In a document without --- a blank line follows them so they stay the document's. null removes them.

Parameters

yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required
The instance.
text string? required
The value.

Returns

YamlDocumentPart The same instance.
public static YamlDocumentPart MarkerComment(YamlDocumentPart yamlDocumentPart, string? text) #

Sets the comment at the end of the --- line, or removes it with null. In a document added by editing whose root is a scalar or flow collection, the root is written on the --- line and the comment follows it.

Parameters

yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required
The instance.
text string? required
The value.

Returns

YamlDocumentPart The same instance.
public static YamlDocumentPart TrailingComment(YamlDocumentPart yamlDocumentPart, string? text) #

Replaces the comment lines after the root's last line; null removes them.

Parameters

yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required
The instance.
text string? required
The value.

Returns

YamlDocumentPart The same instance.