HumanReadableConverter<T> Class

Base class for strongly-typed converters.

public abstract class HumanReadableConverter<T> : HumanReadableConverter

Type parameters

T
The type this converter handles.
Inheritance
HumanReadableConverter HumanReadableConverter<T>

Constructors

NameDescription
HumanReadableConverter()

HumanReadableConverter()

protected HumanReadableConverter()

No documentation is available.

Methods

NameDescription
CanConvert(Type)Determines whether this converter can convert the specified type.
WriteValue(HumanReadableTextWriter, object?, Type, HumanReadableSerializerOptions)Writes a value to the writer.
WriteValue(HumanReadableTextWriter, T?, HumanReadableSerializerOptions)Writes a strongly-typed value to the writer.

Determines whether this converter can convert the specified type.

public sealed override bool CanConvert(Type type)

Parameters

type Type
The type to check.

Returns

bool true if the converter can convert the type; otherwise, false.

WriteValue overloads

WriteValue(HumanReadableTextWriter, object?, Type, HumanReadableSerializerOptions)

HumanReadableConverter`1.cs

Writes a value to the writer.

public sealed override void WriteValue(HumanReadableTextWriter writer, object? value, Type valueType, HumanReadableSerializerOptions options)
Parameters
writer HumanReadableTextWriter
The writer to write to.
value object?
The value to write.
valueType Type
The type of the value.
options HumanReadableSerializerOptions
The serialization options.

WriteValue(HumanReadableTextWriter, T?, HumanReadableSerializerOptions)

Writes a strongly-typed value to the writer.

protected abstract void WriteValue(HumanReadableTextWriter writer, T? value, HumanReadableSerializerOptions options)
Parameters
writer HumanReadableTextWriter
The writer to write to.
value T?
The value to write.
options HumanReadableSerializerOptions
The serialization options.