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
objectSource object to map from
destination
objectDestination object to map into
sourceType
TypeSource type to use
destinationType
TypeDestination 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
objectSource object to map from
sourceType
TypeSource type to use
destinationType
TypeDestination 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
objectSource 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
TSourceSource 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
TSourceSource object to map from
destination
TDestinationDestination 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