internal override IEnumerable <PropertyMapInfo> GetPropertyMapInfo(PropertyInfo targetProperty, Type sourceType) { var destinationPropertyInfo = TargetType.FindProperties(PropertyName); yield return(new PropertyMapInfo { IgnoreMapping = true, TargetType = TargetType, SourceType = targetProperty.DeclaringType, TargetPropertyInfo = destinationPropertyInfo.First() }); if (AdditionalProperties != null) { foreach (var prop in AdditionalProperties) { var targetPropertyInfo = TargetType.FindProperties(prop); yield return(new PropertyMapInfo { IgnoreMapping = true, TargetType = TargetType, SourceType = targetProperty.DeclaringType, TargetPropertyInfo = targetPropertyInfo.First() }); } } }
internal override IEnumerable <PropertyMapInfo> GetPropertyMapInfo(PropertyInfo targetProperty, Type sourceType = null) { var targetPropertyInfo = TargetType.FindProperties(PropertyName); yield return(new PropertyMapInfo { TargetType = TargetType, TargetPropertyInfo = targetPropertyInfo.First(), SourceType = targetProperty.DeclaringType, SourcePropertyInfos = new [] { targetProperty } }); }
internal override PropertyMapInfo GetPropertyMapInfo(PropertyInfo targetProperty) { var destinationPropertyInfo = TargetType.FindProperties(PropertyName); return(new PropertyMapInfo { TargetType = TargetType, TargetPropertyInfo = destinationPropertyInfo.First(), SourceType = targetProperty.DeclaringType, SourcePropertyInfos = new [] { targetProperty } }); }