@@ -366,6 +366,17 @@ public TypeAdapterSetter<TDestination> MapToConstructor(ConstructorInfo ctor)
366366 this . Settings . MapToConstructor = ctor ;
367367 return this ;
368368 }
369+
370+ public TypeAdapterSetter < TDestination > AfterMappingInline ( Expression < Action < TDestination > > action )
371+ {
372+ this . CheckCompiled ( ) ;
373+
374+ var lambda = Expression . Lambda ( action . Body ,
375+ Expression . Parameter ( typeof ( object ) , "src" ) ,
376+ action . Parameters [ 0 ] ) ;
377+ Settings . AfterMappingFactories . Add ( arg => lambda ) ;
378+ return this ;
379+ }
369380 }
370381
371382 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Minor Code Smell" , "S4136:Method overloads should be grouped together" , Justification = "<Pending>" ) ]
@@ -416,6 +427,11 @@ internal TypeAdapterSetter(TypeAdapterSettings settings, TypeAdapterConfig paren
416427 return ( TypeAdapterSetter < TSource , TDestination > ) base . MapToConstructor ( ctor ) ;
417428 }
418429
430+ public new TypeAdapterSetter < TSource , TDestination > AfterMappingInline ( Expression < Action < TDestination > > action )
431+ {
432+ return ( TypeAdapterSetter < TSource , TDestination > ) base . AfterMappingInline ( action ) ;
433+ }
434+
419435 #endregion
420436
421437 public TypeAdapterSetter < TSource , TDestination > IgnoreIf (
@@ -570,15 +586,15 @@ public TypeAdapterSetter<TSource, TDestination> BeforeMappingInline(Expression<A
570586 Settings . BeforeMappingFactories . Add ( arg => action ) ;
571587 return this ;
572588 }
573-
589+
574590 public TypeAdapterSetter < TSource , TDestination > AfterMappingInline ( Expression < Action < TSource , TDestination > > action )
575591 {
576592 this . CheckCompiled ( ) ;
577593
578594 Settings . AfterMappingFactories . Add ( arg => action ) ;
579595 return this ;
580596 }
581-
597+
582598 public TypeAdapterSetter < TSource , TDestination > Include < TDerivedSource , TDerivedDestination > ( )
583599 where TDerivedSource : class , TSource
584600 where TDerivedDestination : class , TDestination
0 commit comments