Class Mapper
Onbox implementation of mapper service. Similar to Automapper
Inheritance
System.Object
Mapper
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Onbox.Core.V8.Mapping
Assembly: Onbox.Core.dll
Syntax
public class Mapper : IMapper
Constructors
| Improve this Doc View SourceMapper(IMapperOperator)
Creates a new mapper object
Declaration
public Mapper(IMapperOperator mapperOperator)
Parameters
Type | Name | Description |
---|---|---|
IMapperOperator | mapperOperator |
Methods
| Improve this Doc View SourceClone<TSource>(TSource)
Clones an object (Maps to a new instance)
Declaration
public TSource Clone<TSource>(TSource source)
where TSource : new()
Parameters
Type | Name | Description |
---|---|---|
TSource | source |
Returns
Type | Description |
---|---|
TSource | The cloned object with all properties copied |
Type Parameters
Name | Description |
---|---|
TSource |
Clone<TSource>(Object)
Clones an object (Maps to a new instance)
Declaration
public TSource Clone<TSource>(object source)
where TSource : new()
Parameters
Type | Name | Description |
---|---|---|
System.Object | source |
Returns
Type | Description |
---|---|
TSource | The cloned object with all properties copied |
Type Parameters
Name | Description |
---|---|
TSource |
Map<TSorce, TTarget>(TSorce, TTarget)
Maps one object to another
Declaration
public void Map<TSorce, TTarget>(TSorce source, TTarget target)
where TSorce : new()
where TTarget : new()
Parameters
Type | Name | Description |
---|---|---|
TSorce | source | The source object |
TTarget | target | The target objects that the properties will be copied to |
Type Parameters
Name | Description |
---|---|
TSorce | |
TTarget |