示例#1
0
 /// <summary>
 /// Adapt the source object to the destination type.
 /// </summary>
 /// <typeparam name="TSource">Source type.</typeparam>
 /// <typeparam name="TDestination">Destination type.</typeparam>
 /// <param name="source">Source object to adapt.</param>
 /// <returns>Adapted destination type.</returns>
 public static TDestination Adapt <TSource, TDestination>(this TSource source)
 {
     return(TypeAdapter <TSource, TDestination> .Map(source));
 }
示例#2
0
 public TDestination Adapt <TSource, TDestination>(TSource source, TDestination destination)
 {
     return(TypeAdapter.Adapt(source, destination));
 }
示例#3
0
 public object Adapt(object source, object destination, Type sourceType, Type destinationType)
 {
     return(TypeAdapter.Adapt(source, destination, sourceType, destinationType));
 }
示例#4
0
 public TDestination Adapt <TDestination>(object source)
 {
     return(TypeAdapter.Adapt <TDestination>(source));
 }