Пример #1
0
        private static IDataSource GetMappingFactoryDataSource(
            ObjectMapperData mapperData,
            ConfiguredObjectFactory factory)
        {
            var condition             = factory.GetConditionOrNull(mapperData);
            var value                 = factory.Create(mapperData);
            var returnLabelMapperData = mapperData.OriginalMapperData ?? mapperData;
            var returnValue           = returnLabelMapperData.GetReturnExpression(value);

            return(new ConfiguredDataSource(
                       mapperData.SourceMember,
                       condition,
                       returnValue,
                       factory.ConfigInfo.IsSequentialConfiguration,
                       factory.ConfigInfo.HasTargetMemberMatcher(),
                       mapperData));
        }
 public Construction(ConfiguredObjectFactory configuredFactory, IMemberMapperData mapperData)
     : this(configuredFactory.Create(mapperData), configuredFactory.GetConditionOrNull(mapperData))
 {
     UsesMappingDataObjectParameter = configuredFactory.UsesMappingDataObjectParameter;
 }