Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Enum

YamlReferenceHandling

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Source revision
0eef6a5756b9 with working tree changes
Base
Enum
Implements
IComparable ISpanFormattable IFormattable IConvertible
Modifiers
sealed

How the serializer treats an object that is reached more than once.

Inheritance

  • Enum
  • YamlReferenceHandling

Usage

Explore 3 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.

Values

public const YamlReferenceHandling None #

Each reference is written in full, and a cycle fails with YamlErrorCodes.ReferenceCycle. An alias in the input read as a typed value is read again from its anchored node; one read as object returns the value read for its anchor, unless YamlSerializerOptions.CopyAliases is set. This is the default.

Value: 0
public const YamlReferenceHandling Preserve #

An object or collection reached again is written as an alias to an anchor on its first occurrence, so shared references and cycles round-trip. Reading maps each alias back to the instance created for its anchor.

Value: 1