Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlConverter<T>

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Source revision
78706d0f9c0e with working tree changes
Modifiers
abstract

Reads and writes values of T. Reading hands the converter each non-null value as a detached node, with aliases expanded; writing hands it a writer positioned where the value goes, for exactly one node. A null scalar reads as the default of T, and a null value writes as a null scalar, without asking the converter.

Inheritance

Derived Types

Usage

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

Returned or exposed by 1

Type Parameters

T
The type the converter handles.

Methods

public abstract T? Read(YamlNode node, YamlSerializerOptions options) #

Reads a value from its node.

Parameters

node OfficeIMO.Yaml.YamlNode required
The value's node: a scalar, mapping or sequence that belongs to no document.
options OfficeIMO.Yaml.YamlSerializerOptions required
The options the serializer runs with.

Returns

T?
public abstract void Write(YamlWriter writer, T? value, YamlSerializerOptions options) #

Writes a non-null value as one node: a scalar, or a mapping or sequence with everything inside it.

Parameters

writer OfficeIMO.Yaml.YamlWriter required
The writer, positioned where the value goes.
value T? required
The value.
options OfficeIMO.Yaml.YamlSerializerOptions required
The options the serializer runs with.

Properties

public override sealed Type Type { get; } #

Gets the type whose values the converter reads and writes.