TomlTypeInfo<T> Class

Represents metadata and operations for a specific serializable type.

public abstract class TomlTypeInfo<T> : TomlTypeInfo

Type parameters

T
The represented CLR type.
Inheritance
TomlTypeInfo TomlTypeInfo<T>

Constructors

NameDescription
TomlTypeInfo(TomlSerializerOptions)Initializes a new instance of the TomlTypeInfo<T> class.

TomlTypeInfo(TomlSerializerOptions)

TomlTypeInfo.cs

Initializes a new instance of the TomlTypeInfo<T> class.

protected TomlTypeInfo(TomlSerializerOptions options)

Parameters

options TomlSerializerOptions
The options associated with the metadata.

Methods

NameDescription
Read(TomlReader)Reads a value from an existing TOML reader.
ReadAsObject(TomlReader)Reads a value from an existing TOML reader.
Write(TomlWriter, object?)Writes a value to an existing TOML writer.
Write(TomlWriter, T)Writes a value to an existing TOML writer.

Read(TomlReader)

Reads a value from an existing TOML reader.

public abstract T? Read(TomlReader reader)

Parameters

reader TomlReader

Returns

T?

ReadAsObject(TomlReader)

TomlTypeInfo.cs

Reads a value from an existing TOML reader.

public sealed override object? ReadAsObject(TomlReader reader)

Parameters

reader TomlReader

Returns

object?

Write overloads

Write(TomlWriter, object?)

TomlTypeInfo.cs

Writes a value to an existing TOML writer.

public sealed override void Write(TomlWriter writer, object? value)
Parameters
writer TomlWriter
value object?

Write(TomlWriter, T)

Writes a value to an existing TOML writer.

public abstract void Write(TomlWriter writer, T value)
Parameters
writer TomlWriter
value T