コード例 #1
0
 /// <summary>
 /// Create and compile mapping functions for the source type specified by the type argument, for all
 /// mapping types (create new, merge, overwrite).
 /// </summary>
 /// <typeparam name="TSource">The source type for which to create the mapping functions.</typeparam>
 /// <returns>
 /// An IPlanTargetSelector with which to specify the target type the mapping functions for which
 /// should be cached.
 /// </returns>
 public static IPlanTargetSelector <TSource> GetPlansFor <TSource>() => Default.GetPlansFor <TSource>();
コード例 #2
0
 /// <summary>
 /// Create and compile mapping functions for mapping from the source type specified by the given
 /// <paramref name="exampleInstance"/>, for all mapping types (create new, merge, overwrite). Use this
 /// overload for anonymous types.
 /// </summary>
 /// <typeparam name="TSource">The source type for which to create the mapping functions.</typeparam>
 /// <param name="exampleInstance">
 /// An instance specifying the source type for which a mapping plan should be created.
 /// </param>
 /// <returns>
 /// An IPlanTargetSelector with which to specify the target type the mapping functions for which
 /// should be cached.
 /// </returns>
 protected IPlanTargetSelector <TSource> GetPlansFor <TSource>(TSource exampleInstance)
 => _mapper.GetPlansFor(exampleInstance);