@@ -39,6 +39,7 @@ private static TDestDelegate _MapExpression<TSourceDelegate, TDestDelegate>(this
3939 private static MethodInfo GetMapExpressionMethod ( this string methodName )
4040 => typeof ( MapperExtensions ) . GetMethod ( methodName , BindingFlags . NonPublic | BindingFlags . Static ) ;
4141
42+ [ Obsolete ( "This method is obsolete. Use IMapper.Map(object source, Type sourceType, Type destinationType) instead." ) ]
4243 public static object MapObject ( this IMapper mapper , object obj , Type sourceType , Type destType )
4344 => "_MapObject" . GetMapObjectMethod ( ) . MakeGenericMethod
4445 (
@@ -153,6 +154,7 @@ public static TDestDelegate MapExpression<TSourceDelegate, TDestDelegate>(this I
153154 /// <param name="mapper"></param>
154155 /// <param name="expression"></param>
155156 /// <returns></returns>
157+ [ Obsolete ( "Use ProjectTo with expansions instead of IMapper.MapExpressionAsInclude." ) ]
156158 public static TDestDelegate MapExpressionAsInclude < TDestDelegate > ( this IMapper mapper , LambdaExpression expression )
157159 where TDestDelegate : LambdaExpression
158160 {
@@ -175,6 +177,7 @@ public static TDestDelegate MapExpressionAsInclude<TDestDelegate>(this IMapper m
175177 /// <param name="mapper"></param>
176178 /// <param name="expression"></param>
177179 /// <returns></returns>
180+ [ Obsolete ( "Use ProjectTo with expansions instead of IMapper.MapExpressionAsInclude." ) ]
178181 public static TDestDelegate MapExpressionAsInclude < TSourceDelegate , TDestDelegate > ( this IMapper mapper , TSourceDelegate expression )
179182 where TSourceDelegate : LambdaExpression
180183 where TDestDelegate : LambdaExpression
@@ -212,6 +215,7 @@ public static ICollection<TDestDelegate> MapExpressionList<TDestDelegate>(this I
212215 /// <param name="mapper"></param>
213216 /// <param name="collection"></param>
214217 /// <returns></returns>
218+ [ Obsolete ( "Use ProjectTo with expansions instead of IMapper.MapIncludesList." ) ]
215219 public static ICollection < TDestDelegate > MapIncludesList < TSourceDelegate , TDestDelegate > ( this IMapper mapper , ICollection < TSourceDelegate > collection )
216220 where TSourceDelegate : LambdaExpression
217221 where TDestDelegate : LambdaExpression
@@ -224,6 +228,7 @@ public static ICollection<TDestDelegate> MapIncludesList<TSourceDelegate, TDestD
224228 /// <param name="mapper"></param>
225229 /// <param name="collection"></param>
226230 /// <returns></returns>
231+ [ Obsolete ( "Use ProjectTo with expansions instead of IMapper.MapIncludesList." ) ]
227232 public static ICollection < TDestDelegate > MapIncludesList < TDestDelegate > ( this IMapper mapper , IEnumerable < LambdaExpression > collection )
228233 where TDestDelegate : LambdaExpression
229234 => collection ? . Select ( mapper . MapExpressionAsInclude < TDestDelegate > ) . ToList ( ) ;
@@ -235,6 +240,7 @@ public static ICollection<TDestDelegate> MapIncludesList<TDestDelegate>(this IMa
235240 /// <param name="infoDictionary"></param>
236241 /// <param name="typeMappings"></param>
237242 /// <returns></returns>
243+ [ Obsolete ( "This method will be moved to a public class meant for internal use." ) ]
238244 public static List < ParameterExpression > GetDestinationParameterExpressions ( this LambdaExpression expression , MapperInfoDictionary infoDictionary , Dictionary < Type , Type > typeMappings )
239245 {
240246 foreach ( var p in expression . Parameters . Where ( p => ! infoDictionary . ContainsKey ( p ) ) )
@@ -253,6 +259,7 @@ public static List<ParameterExpression> GetDestinationParameterExpressions(this
253259 /// <param name="typeMappings"></param>
254260 /// <param name="configurationProvider"></param>
255261 /// <returns></returns>
262+ [ Obsolete ( "This method is not being used and will be removed." ) ]
256263 public static Dictionary < Type , Type > AddTypeMapping < TSource , TDest > ( this Dictionary < Type , Type > typeMappings , IConfigurationProvider configurationProvider )
257264 => typeMappings == null
258265 ? throw new ArgumentException ( Properties . Resources . typeMappingsDictionaryIsNull )
@@ -293,6 +300,7 @@ private static void AddUnderlyingTypes(this Dictionary<Type, Type> typeMappings,
293300 /// <param name="sourceType"></param>
294301 /// <param name="destType"></param>
295302 /// <returns></returns>
303+ [ Obsolete ( "This method will be moved to a public class meant for internal use." ) ]
296304 public static Dictionary < Type , Type > AddTypeMapping ( this Dictionary < Type , Type > typeMappings , IConfigurationProvider configurationProvider , Type sourceType , Type destType )
297305 {
298306 if ( typeMappings == null )
@@ -345,6 +353,7 @@ void AddTypeMaps(TypeMap typeMap)
345353 /// <param name="typeMappings"></param>
346354 /// <param name="sourceType"></param>
347355 /// <returns></returns>
356+ [ Obsolete ( "This method will be moved to a public class meant for internal use." ) ]
348357 public static Type ReplaceType ( this Dictionary < Type , Type > typeMappings , Type sourceType )
349358 {
350359 if ( sourceType . IsArray )
0 commit comments