예제 #1
0
 /// <summary>
 /// Execute a mapping from the source object to the existing target object.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <param name="source">Source object to map from.</param>
 /// <param name="target">Target object to map into.</param>
 public void Map <TSource, TTarget>(TSource source, TTarget target)
 {
     InstanceMapper <TSource, TTarget> .GetInstance(this).Map(source, target);
 }
예제 #2
0
 /// <summary>
 /// Returns a mapper instance for specified types.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <returns>A mapper instance for specified types.</returns>
 public IInstanceMapper <TSource, TTarget> GetMapper <TSource, TTarget>()
 {
     return(InstanceMapper <TSource, TTarget> .GetInstance(this));
 }
예제 #3
0
 /// <summary>
 /// Execute a mapping from the source object to a new target object.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <param name="source">Source object to map from.</param>
 /// <returns>Mapped target object.</returns>
 public TTarget Map <TSource, TTarget>(TSource source)
 {
     return(InstanceMapper <TSource, TTarget> .GetInstance(this).Map(source));
 }