ConverterListExtensions Class

Provides extension methods for adding converters to a converter list.

public static class ConverterListExtensions

Methods

NameDescription
Add<T>(IList<HumanReadableConverter>, Func<T, HumanReadableSerializerOptions, string>)Adds a converter using a conversion function that accepts serialization options.
Add<T>(IList<HumanReadableConverter>, Func<T, string>)Adds a converter using a conversion function.

Add overloads

Add<T>(IList<HumanReadableConverter>, Func<T, HumanReadableSerializerOptions, string>)

ConverterListExtensions.cs

Adds a converter using a conversion function that accepts serialization options.

public static void Add<T>(this IList<HumanReadableConverter> converters, Func<T, HumanReadableSerializerOptions, string> convert)
Type parameters
T
The type to convert.
Parameters
converters IList<HumanReadableConverter>
The list of converters.
convert Func<T, HumanReadableSerializerOptions, string>
The conversion function.

Add<T>(IList<HumanReadableConverter>, Func<T, string>)

ConverterListExtensions.cs

Adds a converter using a conversion function.

public static void Add<T>(this IList<HumanReadableConverter> converters, Func<T, string> convert)
Type parameters
T
The type to convert.
Parameters
converters IList<HumanReadableConverter>
The list of converters.
convert Func<T, string>
The conversion function.