Table of Contents

Interface ITypeConverter<TSource, TDestination>

Namespace
ForgeMap
Assembly
ForgeMap.Abstractions.dll

Interface for custom type converters. Implement this for complex type transformations that cannot be expressed with ForgeFromAttribute.

public interface ITypeConverter<in TSource, out TDestination>

Type Parameters

TSource

The source type to convert from.

TDestination

The destination type to convert to.

Methods

Convert(TSource)

Converts a source object to a destination object.

TDestination Convert(TSource source)

Parameters

source TSource

The source object to convert. Guaranteed to be non-null when called through generated ForgeMap code.

Returns

TDestination

The converted destination object.