Table of Contents

Class AutoMapperMappingHandler

Namespace
Apizr
Assembly
Apizr.Integrations.AutoMapper.dll

AutoMapper mapping handler implementation

public class AutoMapperMappingHandler : IMappingHandler
Inheritance
AutoMapperMappingHandler
Implements
Inherited Members

Constructors

AutoMapperMappingHandler(IMapper)

public AutoMapperMappingHandler(IMapper mapper)

Parameters

mapper IMapper

Methods

Map(object, object, Type, Type)

Execute a mapping from the source object to existing destination object with explicit Type objects

public object Map(object source, object destination, Type sourceType, Type destinationType)

Parameters

source object

Source object to map from

destination object

Destination object to map into

sourceType Type

Source type to use

destinationType Type

Destination type to use

Returns

object

Mapped destination object, same instance as the destination object

Map(object, Type, Type)

Execute a mapping from the source object to a new destination object with explicit Type objects

public object Map(object source, Type sourceType, Type destinationType)

Parameters

source object

Source object to map from

sourceType Type

Source type to use

destinationType Type

Destination type to create

Returns

object

Mapped destination object

Map<TDestination>(object)

Execute a mapping from the source object to a new destination object. The source type is inferred from the source object.

public TDestination Map<TDestination>(object source)

Parameters

source object

Source object to map from

Returns

TDestination

Mapped destination object

Type Parameters

TDestination

Destination type to create

Map<TSource, TDestination>(TSource)

Execute a mapping from the source object to a new destination object.

public TDestination Map<TSource, TDestination>(TSource source)

Parameters

source TSource

Source object to map from

Returns

TDestination

Mapped destination object

Type Parameters

TSource

Source type to use, regardless of the runtime type

TDestination

Destination type to create

Map<TSource, TDestination>(TSource, TDestination)

Execute a mapping from the source object to the existing destination object.

public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)

Parameters

source TSource

Source object to map from

destination TDestination

Destination object to map into

Returns

TDestination

The mapped destination object, same instance as the destination object

Type Parameters

TSource

Source type to use

TDestination

Destination type