Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlMappingFluent

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Modifiers
static

The fluent methods of YamlMapping, 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
  • YamlMappingFluent

Methods

public static YamlMapping Anchor(YamlMapping yamlMapping, string? name) #

Sets, renames or removes (null) the node's anchor. Renaming updates every alias that refers to the node; removing an anchor that aliases still use fails.

Parameters

yamlMapping OfficeIMO.Yaml.YamlMapping required
The instance.
name string? required
The value.

Returns

YamlMapping The same instance.
public static YamlMapping LeadingComment(YamlMapping yamlMapping, string? text) #

Replaces the comment lines above the node's entry; each line of text becomes one # line comment at the entry's indentation. null or an empty string removes them.

Parameters

yamlMapping OfficeIMO.Yaml.YamlMapping required
The instance.
text string? required
The value.

Returns

YamlMapping The same instance.
public static YamlMapping SpaceBefore(YamlMapping yamlMapping, bool value = true) #

Sets whether a blank line separates the node's entry from the previous content.

Parameters

yamlMapping OfficeIMO.Yaml.YamlMapping required
The instance.
value bool = true optional
The value. True when omitted.

Returns

YamlMapping The same instance.
public static YamlMapping Tag(YamlMapping yamlMapping, string? tag) #

Sets or removes (null) the node's tag, in the resolved form YamlNode.Tag reports (tag:yaml.org,2002:str, !Ref). Tags change how a scalar resolves; they never activate .NET types.

Parameters

yamlMapping OfficeIMO.Yaml.YamlMapping required
The instance.
tag string? required
The value.

Returns

YamlMapping The same instance.
public static YamlMapping TrailingComment(YamlMapping yamlMapping, string? text) #

Sets the comment at the end of the node's line (value # text), or removes it with null.

Parameters

yamlMapping OfficeIMO.Yaml.YamlMapping required
The instance.
text string? required
The value.

Returns

YamlMapping The same instance.