Table of Contents

Method Explain

Namespace
Mapperion
Assembly
Mapperion.dll

Explain<TSource, TDestination>()

Describes, member by member, what a map resolved to and where each value comes from.

[RequiresUnreferencedCode("Explaining a map inspects types by reflection.")]
public string Explain<TSource, TDestination>()

Returns

string

The description, including the case where no map is declared for the pair.

Type Parameters

TSource

The source type.

TDestination

The destination type.

Remarks

For reading, not for parsing: the wording is meant to answer "why did this member get that" and will change whenever a clearer wording turns up. It separates what was configured by hand from what a convention decided, which is most of what makes a surprising result surprising. Nothing here runs a mapping; it reads the built model.

Explain(Type, Type)

Describes a map without generics.

[RequiresUnreferencedCode("Explaining a map inspects types by reflection.")]
public string Explain(Type sourceType, Type destinationType)

Parameters

sourceType Type

The source type.

destinationType Type

The destination type.

Returns

string

The description, including the case where no map is declared for the pair.

Exceptions

ArgumentNullException

Either type is null.

Explain()

Describes every declared map, in the order they were declared.

[RequiresUnreferencedCode("Explaining a map inspects types by reflection.")]
public string Explain()

Returns

string

The descriptions, separated by a blank line.