Table of Contents

Class ConvertFormat

Namespace
Yarhl.FileFormat
Assembly
Yarhl.dll

Convert formats with converters.

public static class ConvertFormat
Inheritance
ConvertFormat
Inherited Members

Methods

With(Type, dynamic, params object?[])

Converts the format using a converter with the specified type.

public static object With(Type converterType, dynamic src, params object?[] args)

Parameters

converterType Type

Type of the converter.

src dynamic

Format to convert.

args object[]

Arguments for the constructor of the type if any.

Returns

object

The new format.

With(IConverter, dynamic)

Converts the format using the specified converter.

[Obsolete("Create the converter object or use the IFormat.ConvertWith() extension method.")]
public static object With(IConverter converter, dynamic src)

Parameters

converter IConverter

Converter to use.

src dynamic

Format to convert.

Returns

object

The new format.

With<TConv>(dynamic)

Converts the format using a converter with the specified type.

[Obsolete("Create the converter object or use the IFormat.ConvertWith() extension method.")]
public static object With<TConv>(dynamic src) where TConv : IConverter, new()

Parameters

src dynamic

Format to convert.

Returns

object

The new format.

Type Parameters

TConv

Type of the converter.

With<TConv, TParam>(TParam, dynamic)

Converts the format using a converter with the specified type and initialized with some parameters.

[Obsolete("Create the converter object or use the IFormat.ConvertWith() extension method.")]
public static object With<TConv, TParam>(TParam param, dynamic src) where TConv : IConverter, IInitializer<TParam>, new()

Parameters

param TParam

Parameters to initialize the converter.

src dynamic

Format to convert.

Returns

object

The new format.

Type Parameters

TConv

Type of the converter.

TParam

Type of the parameters.