HumanReadableConverter Class

Base class for converters that convert objects to human-readable text.

public abstract class HumanReadableConverter

Constructors

NameDescription
HumanReadableConverter()

HumanReadableConverter()

protected HumanReadableConverter()

No documentation is available.

Properties

NameDescription
HandleNullGets a value indicating whether this converter handles null values.

Gets a value indicating whether this converter handles null values.

public virtual bool HandleNull { get; }

Property value

bool

Methods

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

CanConvert(Type)

Determines whether this converter can convert the specified type.

public abstract bool CanConvert(Type type)

Parameters

type Type
The type to check.

Returns

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

WriteValue(HumanReadableTextWriter, object?, Type, HumanReadableSerializerOptions)

Writes a value to the writer.

public abstract 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.