Exemplo n.º 1
0
 public virtual TTarget GetTargetFromScope(TSource source, MappingExecutionScope scope)
 {
     return(scope.CreateOnce(
                source,
                () => MappingContext.CreateUsingAction == null
                   ? (TTarget)Creator.Create(typeof(TTarget))   //try to just create it with no params
                   : MappingContext.CreateUsingAction(source)));
 }
Exemplo n.º 2
0
 public override TTarget GetTargetFromScope(TSource source, MappingExecutionScope scope)
 {
     return(scope.CreateOnce(
                source,
                () => MappingContext.CreateUsingAction == null
                //create a new list
                   ? CreateTarget()
                //create the collection based on the CreateUsing specified
                   : MappingContext.CreateUsingAction(source)));
 }