/// <summary> /// Create and compile mapping functions for a particular type of mapping of the source type /// specified by the type argument. /// </summary> /// <typeparam name="TSource">The source type for which to create the mapping functions.</typeparam> /// <returns> /// An IPlanTargetAndRuleSetSelector with which to specify the type of mapping the functions for which /// should be cached. /// </returns> public static IPlanTargetAndRuleSetSelector <TSource> GetPlanFor <TSource>() => Default.GetPlanFor <TSource>();
// TODO: Test coverage /// <summary> /// Create and compile a mapping function for a particular type of mapping of the source type specified by /// the given <paramref name="exampleInstance"/>. Use this overload for anonymous types. /// </summary> /// <typeparam name="TSource">The type of the given <paramref name="exampleInstance"/>.</typeparam> /// <param name="exampleInstance"> /// An instance specifying the source type for which a mapping plan should be created. /// </param> /// <returns> /// An IPlanTargetAndRuleSetSelector with which to specify the type of mapping the function for which /// should be cached. /// </returns> protected IPlanTargetAndRuleSetSelector <TSource> GetPlanFor <TSource>(TSource exampleInstance) => _mapper.GetPlanFor(exampleInstance);