Table of Contents

Method Map

Namespace
Mapperion
Assembly
Mapperion.dll

Map<TDestination>(object?)

Maps source to a new instance of TDestination.

TDestination Map<TDestination>(object? source)

Parameters

source object

The source object. May be null.

Returns

TDestination

The mapped destination instance.

Type Parameters

TDestination

The destination type.

Map<TSource, TDestination>(TSource)

Maps source to a new instance of TDestination using the statically known source type, avoiding a runtime type lookup.

TDestination Map<TSource, TDestination>(TSource source)

Parameters

source TSource

The source object. May be null.

Returns

TDestination

The mapped destination instance.

Type Parameters

TSource

The source type.

TDestination

The destination type.

Map<TSource, TDestination>(TSource, TDestination)

Maps source onto an existing destination instance.

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

Parameters

source TSource

The source object. May be null.

destination TDestination

The destination instance to populate.

Returns

TDestination

The populated destination instance.

Type Parameters

TSource

The source type.

TDestination

The destination type.

Map<TDestination>(object?, Action<IMappingOperationOptions>)

Maps source to a new instance of TDestination, passing values the converters, resolvers and steps of this operation can read.

TDestination Map<TDestination>(object? source, Action<IMappingOperationOptions> options)

Parameters

source object

The source object. May be null.

options Action<IMappingOperationOptions>

Sets up the operation, typically by filling its items.

Returns

TDestination

The mapped destination instance.

Type Parameters

TDestination

The destination type.

Exceptions

ArgumentNullException

options is null.

Map<TSource, TDestination>(TSource, Action<IMappingOperationOptions>)

Maps source using the statically known source type, passing values the converters, resolvers and steps of this operation can read.

TDestination Map<TSource, TDestination>(TSource source, Action<IMappingOperationOptions> options)

Parameters

source TSource

The source object. May be null.

options Action<IMappingOperationOptions>

Sets up the operation, typically by filling its items.

Returns

TDestination

The mapped destination instance.

Type Parameters

TSource

The source type.

TDestination

The destination type.

Exceptions

ArgumentNullException

options is null.

Map<TSource, TDestination>(TSource, TDestination, Action<IMappingOperationOptions>)

Maps source onto an existing instance, passing values the converters, resolvers and steps of this operation can read.

TDestination Map<TSource, TDestination>(TSource source, TDestination destination, Action<IMappingOperationOptions> options)

Parameters

source TSource

The source object. May be null.

destination TDestination

The destination instance to populate.

options Action<IMappingOperationOptions>

Sets up the operation, typically by filling its items.

Returns

TDestination

The populated destination instance.

Type Parameters

TSource

The source type.

TDestination

The destination type.

Exceptions

ArgumentNullException

options is null.

Map(object?, Type, Type)

Maps source to destinationType without generics.

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

Parameters

source object

The source object. May be null.

sourceType Type

The declared source type.

destinationType Type

The destination type.

Returns

object

The mapped destination instance.

Map(object?, Type, Type, Action<IMappingOperationOptions>)

Maps source to destinationType without generics, passing values the converters, resolvers and steps of this operation can read.

object? Map(object? source, Type sourceType, Type destinationType, Action<IMappingOperationOptions> options)

Parameters

source object

The source object. May be null.

sourceType Type

The declared source type.

destinationType Type

The destination type.

options Action<IMappingOperationOptions>

Sets up the operation, typically by filling its items.

Returns

object

The mapped destination instance.

Exceptions

ArgumentNullException

sourceType, destinationType or options is null.