Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlSequenceMerge

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Source revision
0eef6a5756b9 with working tree changes
Modifiers
sealed

How YamlDocument.Merge and YamlMapping.Merge combine an overlay sequence with the base sequence at the same path: YamlSequenceMerge.Replace (the default), YamlSequenceMerge.Append or YamlSequenceMerge.MergeByKey.

Inheritance

  • object
  • YamlSequenceMerge

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public static YamlSequenceMerge MergeByKey(string keyName) #

Mapping items are matched by the value of a key, for example containers by name: an overlay item merges into the first base item with the same key value, and items without a match are appended.

Parameters

keyName string required
The key whose scalar value identifies an item.

Exceptions

  • ArgumentException – keyName is null or empty.

Properties

public static YamlSequenceMerge Replace { get; } #

The overlay's items replace the base items, as Helm and yq's * operator do. Items whose values already match keep their text and comments; only the items that differ change.

public static YamlSequenceMerge Append { get; } #

The overlay's items are appended after the base items.