Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlMetadataServices

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Source revision
0eef6a5756b9 with working tree changes
Modifiers
static
Attributes
EditorBrowsable(1)

Creates YamlTypeInfo<T> instances. The source generator calls these methods from the code it emits for a YamlSerializerContext, and reflection-based metadata uses the same methods, so both produce the same YAML.

Inheritance

  • object
  • YamlMetadataServices

Methods

public static YamlTypeInfo<TCollection> CreateCollectionInfo<TCollection, TElement>(YamlSerializerOptions options, Func<List<TElement?>, TCollection> finish) #

Creates metadata for a collection written as a sequence. Items are read into a list, and finish turns the list into the collection.

Type Parameters

TCollection
TElement

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
finish System.Func<System.Collections.Generic.List<TElement?>, TCollection> required
public static YamlTypeInfo<TDictionary> CreateDictionaryInfo<TDictionary, TKey, TValue>(YamlSerializerOptions options, Func<Dictionary<TKey, TValue?>, TDictionary> finish) #

Creates metadata for a dictionary written as a mapping. Entries are read into a dictionary, and finish turns it into the target type.

Type Parameters

TDictionary
TKey
TValue

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
finish System.Func<System.Collections.Generic.Dictionary<TKey, TValue?>, TDictionary> required
public static YamlTypeInfo<T> CreateEnumInfo<T>(YamlSerializerOptions options) #

Creates metadata for an enum written by member name.

Type Parameters

T

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
public static YamlTypeInfo<T?> CreateNullableInfo<T>(YamlSerializerOptions options) #

Creates metadata for a nullable value type.

Type Parameters

T

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
public static YamlTypeInfo<T?> CreateObjectInfo<T>(YamlSerializerOptions options, YamlObjectInfoValues<T?> values) #

Creates metadata for an object written as a mapping of its properties.

Type Parameters

T

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
values OfficeIMO.Yaml.YamlObjectInfoValues<T?> required
public static YamlPropertyInfo CreatePropertyInfo<T>(YamlSerializerOptions options, YamlPropertyInfoValues<T?> values) #

Creates metadata for one property of an object.

Type Parameters

T

Parameters

options OfficeIMO.Yaml.YamlSerializerOptions required
values OfficeIMO.Yaml.YamlPropertyInfoValues<T?> required