public static Expression SingleDataSource(IDataSource dataSource, IMemberMapperData mapperData)
        {
            var value = dataSource.IsConditional
                ? dataSource.Value.ToIfFalseDefaultCondition(dataSource.Condition, mapperData)
                : dataSource.Value;

            return(dataSource.AddSourceCondition(value));
        }
        private static Expression GetValueSequenceValue(this IDataSource dataSource)
        {
            var mapping = dataSource.Value;

            if (dataSource.IsConditional)
            {
                mapping = Expression.IfThen(dataSource.Condition, mapping);
            }

            mapping = dataSource.AddSourceCondition(mapping);

            if (dataSource.Variables.Any())
            {
                mapping = Expression.Block(dataSource.Variables, mapping);
            }

            return(mapping);
        }