Example #1
0
        public virtual IEnumerable <string> Transform(IEnumerable <string> input,
                                                      DocumentSpecification sourceSpecification,
                                                      DocumentSpecification targetSpecification)
        {
            ETLMapperEventArgs e = new ETLMapperEventArgs()
            {
                SourceSpecification = sourceSpecification,
                TargetSpecification = targetSpecification
            };

            OnMapperStart?.Invoke(this, e);
            foreach (var item in input)
            {
                e.Input = item;
                OnTransforming?.Invoke(this, e);
                e.Output = TransformInputToOutput(item, e.SourceSpecification, e.TargetSpecification);
                e.Counter++;
                OnTransformed?.Invoke(this, e);
                yield return(e.Output);
            }
            OnMapperEnd?.Invoke(this, e);
        }
Example #2
0
 public override void TransformBy(Transformation transform)
 {
     base.TransformBy(transform);
     OnTransformed?.Invoke(this, new TransformingEventArgs(transform));
     OnEntityChanged?.Invoke(this, null);
 }
Example #3
0
 public override void TransformBy(Transformation xform)
 {
     base.TransformBy(xform);
     OnTransformed?.Invoke(this, new TransformingEventArgs(xform));
 }