Show / Hide Table of Contents

Class DefaultObjectMapper

Inheritance
object
DefaultObjectMapper
DefaultObjectMapper<TContext>
Implements
IObjectMapper
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.ObjectMapping
Assembly: Volo.Abp.ObjectMapping.dll
Syntax
public class DefaultObjectMapper : IObjectMapper, ITransientDependency

Constructors

DefaultObjectMapper(IServiceProvider, IAutoObjectMappingProvider)

Declaration
public DefaultObjectMapper(IServiceProvider serviceProvider, IAutoObjectMappingProvider autoObjectMappingProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider
IAutoObjectMappingProvider autoObjectMappingProvider

Fields

MapCache

Declaration
protected static readonly ConcurrentDictionary<string, Func<object, object, object, object?>> MapCache
Field Value
Type Description
ConcurrentDictionary<string, Func<object, object, object, object>>

Properties

AutoObjectMappingProvider

Declaration
public IAutoObjectMappingProvider AutoObjectMappingProvider { get; }
Property Value
Type Description
IAutoObjectMappingProvider

ServiceProvider

Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
Type Description
IServiceProvider

Methods

AutoMap<TSource, TDestination>(object)

Declaration
protected virtual TDestination AutoMap<TSource, TDestination>(object source)
Parameters
Type Name Description
object source
Returns
Type Description
TDestination
Type Parameters
Name Description
TSource
TDestination

AutoMap<TSource, TDestination>(TSource, TDestination)

Declaration
protected virtual TDestination AutoMap<TSource, TDestination>(TSource source, TDestination destination)
Parameters
Type Name Description
TSource source
TDestination destination
Returns
Type Description
TDestination
Type Parameters
Name Description
TSource
TDestination

CreateMapDelegate(Type, Type, Type, bool)

Declaration
protected virtual Func<object, object, object, object?> CreateMapDelegate(Type mapperType, Type sourceArgumentType, Type destinationArgumentType, bool hasDestination)
Parameters
Type Name Description
Type mapperType
Type sourceArgumentType
Type destinationArgumentType
bool hasDestination
Returns
Type Description
Func<object, object, object, object>

Map<TSource, TDestination>(TSource)

Declaration
public virtual TDestination Map<TSource, TDestination>(TSource source)
Parameters
Type Name Description
TSource source
Returns
Type Description
TDestination
Type Parameters
Name Description
TSource
TDestination

Map<TSource, TDestination>(TSource, TDestination)

Declaration
public virtual TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
Parameters
Type Name Description
TSource source
TDestination destination
Returns
Type Description
TDestination
Type Parameters
Name Description
TSource
TDestination

TryToMapCollection<TSource, TDestination>(IServiceScope, TSource, TDestination?, out TDestination)

Declaration
protected virtual bool TryToMapCollection<TSource, TDestination>(IServiceScope serviceScope, TSource source, TDestination? destination, out TDestination collectionResult)
Parameters
Type Name Description
IServiceScope serviceScope
TSource source
TDestination destination
TDestination collectionResult
Returns
Type Description
bool
Type Parameters
Name Description
TSource
TDestination

Implements

IObjectMapper
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
ObjectMapperExtensions.Map(IObjectMapper, Type, Type, object)
ObjectMapperExtensions.Map(IObjectMapper, Type, Type, object, object)
In this article
Back to top Powered by ABP.IO Platform