Method Map
- Namespace
- Mapperion
- Assembly
- Mapperion.dll
Map<TDestination>(object?)
Maps source to a new instance of TDestination.
TDestination Map<TDestination>(object? source)
Parameters
Returns
- TDestination
The mapped destination instance.
Type Parameters
TDestinationThe 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
sourceTSourceThe source object. May be null.
Returns
- TDestination
The mapped destination instance.
Type Parameters
TSourceThe source type.
TDestinationThe destination type.
Map<TSource, TDestination>(TSource, TDestination)
Maps source onto an existing destination instance.
TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
Parameters
sourceTSourceThe source object. May be null.
destinationTDestinationThe destination instance to populate.
Returns
- TDestination
The populated destination instance.
Type Parameters
TSourceThe source type.
TDestinationThe 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
sourceobjectThe source object. May be null.
optionsAction<IMappingOperationOptions>Sets up the operation, typically by filling its items.
Returns
- TDestination
The mapped destination instance.
Type Parameters
TDestinationThe destination type.
Exceptions
- ArgumentNullException
optionsis 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
sourceTSourceThe source object. May be null.
optionsAction<IMappingOperationOptions>Sets up the operation, typically by filling its items.
Returns
- TDestination
The mapped destination instance.
Type Parameters
TSourceThe source type.
TDestinationThe destination type.
Exceptions
- ArgumentNullException
optionsis 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
sourceTSourceThe source object. May be null.
destinationTDestinationThe destination instance to populate.
optionsAction<IMappingOperationOptions>Sets up the operation, typically by filling its items.
Returns
- TDestination
The populated destination instance.
Type Parameters
TSourceThe source type.
TDestinationThe destination type.
Exceptions
- ArgumentNullException
optionsis null.
Map(object?, Type, Type)
Maps source to destinationType without generics.
object? Map(object? source, Type sourceType, Type destinationType)
Parameters
sourceobjectThe source object. May be null.
sourceTypeTypeThe declared source type.
destinationTypeTypeThe 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
sourceobjectThe source object. May be null.
sourceTypeTypeThe declared source type.
destinationTypeTypeThe destination type.
optionsAction<IMappingOperationOptions>Sets up the operation, typically by filling its items.
Returns
- object
The mapped destination instance.
Exceptions
- ArgumentNullException
sourceType,destinationTypeoroptionsis null.