Table of Contents

Class MapperConfiguration

Namespace
Mapperion
Assembly
Mapperion.dll

The entry point: runs the configuration callback once and freezes the result into a model. Building is a startup cost; the resulting instance is immutable and safe to share.

public sealed class MapperConfiguration
Inheritance
MapperConfiguration
Inherited Members

Constructors

MapperConfiguration(Action<IMapperConfigurationExpression>)

Builds a configuration from the given callback.

Properties

Model

Gets the frozen configuration model the compiler turns into executable plans.

Options

Gets the global options in force.

Methods

AssertConfigurationIsValid()

The name AutoMapper uses for AssertIsValid(), so migrated startup code keeps compiling unchanged.

AssertIsValid()

Throws when the configuration has problems, listing every one of them rather than stopping at the first.

CreateMapper()

Builds the mapper. Plans are compiled the first time each type pair is mapped and kept afterwards, so the first call for a pair is slower than the rest.

CreateMapper(IServiceProvider)

Builds a mapper that takes its converters, resolvers and mapping actions from the given container, falling back to construction for the ones it does not know. Mappers built from the same configuration share their compiled plans, so one per scope is cheap.

Explain()

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

Explain(Type, Type)

Describes a map without generics.

Explain<TSource, TDestination>()

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