Class
YamlAlias
OfficeIMO.Yaml
An alias node (*name). The tree keeps aliases as nodes so saving and editing preserve them; resolution is a view: YamlAlias.Target and the typed reads on YamlNode look through to the anchored node.
Inheritance
- YamlNode
- YamlAlias
Constructors
public YamlAlias(YamlNode anchored) #Creates an alias to an anchored node, for example to reuse shared settings with a << merge key. The alias must come after its anchor in the document when it is saved.
Parameters
- anchored OfficeIMO.Yaml.YamlNode
Exceptions
ArgumentException– anchored has no anchor, or is itself an alias.
Inherited Methods
public YamlNode SetAnchor(string? name) #Inherited from YamlNode
Parameters
- name string?
Returns
YamlNodepublic YamlNode SetComment(string? text) #Inherited from YamlNode
Parameters
- text string?
Returns
YamlNodepublic YamlNode SetCommentBefore(string? text) #Inherited from YamlNode
Parameters
- text string?
Returns
YamlNodepublic YamlNode SetSpaceBefore(bool value) #Inherited from YamlNode
Parameters
- value bool
Returns
YamlNodeProperties
public string Name { get; } #Gets the anchor name the alias refers to, without *. It follows renames of the anchor.
public YamlNode Target { get; } #Gets the anchored node: the most recent node before the alias in the same document whose anchor is YamlAlias.Name. It is never itself an alias.