public IPropertyMapsBuilder <TSource, TReceiver> For <TReceiverMember>(Expression <Func <TReceiver, TReceiverMember> > member, Action <IMappingActionsBuilder <TSource, TReceiverMember> > setupAction) { var propertyMapBuilder = new PropertyMapBuilder <TSource, TReceiver, TReceiverMember>(); var propertyMap = propertyMapBuilder .AddMember(member) .AddSetupAction(setupAction) .Build(); _propertyMaps.RemoveAll(x => x.ReceiverProperty.Equals(propertyMap.ReceiverProperty)); _propertyMaps.Add(propertyMap); return(this); }
public IProfileMapBuilder <TSource, TReceiver> For <TReceiverMember>( Expression <Func <TReceiver, TReceiverMember> > member, Action <IMappingActionsBuilder <TSource, TReceiverMember> > setupAction) { var propertyMapBuilder = new PropertyMapBuilder <TSource, TReceiver, TReceiverMember>(); var propertyMap = propertyMapBuilder .AddMember(member) .AddSetupAction(setupAction) .Build(); AddOrReplacePropertyMap(propertyMap); return(this); }