/// <summary> /// Append a new transformer to the end. /// </summary> /// <returns>The new composite data loader</returns> public CompositeDataLoader <TSource, TNewLast> AppendTransformer <TNewLast>(TNewLast transformer) where TNewLast : class, ITransformer { Contracts.CheckValue(transformer, nameof(transformer)); return(new CompositeDataLoader <TSource, TNewLast>(Loader, Transformer.Append(transformer))); }
internal TransformerChain<ITransformer> GetTransformer() { var result = new TransformerChain<ITransformer>(); foreach (var transform in _transforms) { if (transform.Transform is RowToRowMapperTransform mapper) { var transformer = mapper.GetTransformer(); result = result.Append(transformer); } else { ITransformer transformer = new TransformWrapper(_host, transform.Transform); result = result.Append(transformer); } } return result; }