public virtual IEnumerable <IRow> Read() { Context.Debug(() => $"Running {Transforms.Count} transforms."); if (Context.Entity.NeedsUpdate()) { if (Context.Process.Mode != "init") { if (Context.Entity.Version != string.Empty) { var version = Context.Entity.GetVersionField(); if (version.Type == "byte[]") { var min = Context.Entity.MinVersion == null ? "null" : Utility.BytesToHexViaLookup32((byte[])Context.Entity.MinVersion).TrimStart(new[] { '0' }); var max = Context.Entity.MaxVersion == null ? "null" : Utility.BytesToHexViaLookup32((byte[])Context.Entity.MaxVersion).TrimStart(new[] { '0' }); Context.Info("Change Detected: Input:{0} > Output:{1}", max, min); } else { Context.Info("Change Detected: Input:{0} > Output:{1}", Context.Entity.MaxVersion ?? "null", Context.Entity.MinVersion ?? "null"); } } } var data = Reader == null?InputProvider.Read() : Reader.Read(); #if NETS10 // no PLINQ #else if (Context.Entity.Pipeline == "parallel.linq") { data = data.AsParallel(); } #endif if (Transforms.Any()) { #if NETS10 data = Transforms.Aggregate(data, (rows, t) => t.Operate(rows)); #else if (Context.Entity.Pipeline == "parallel.linq") { data = Transforms.AsParallel().Aggregate(data, (rows, t) => t.Operate(rows)); } else { data = Transforms.Aggregate(data, (rows, t) => t.Operate(rows)); } #endif } if (Validators.Any()) { #if NETS10 data = Validators.Aggregate(data, (rows, v) => v.Operate(rows)); #else if (Context.Entity.Pipeline == "parallel.linq") { data = Validators.AsParallel().Aggregate(data, (rows, v) => v.Operate(rows)); } else { data = Validators.Aggregate(data, (rows, v) => v.Operate(rows)); } #endif } return(data); } Context.Info("Change Detected: No."); return(Enumerable.Empty <IRow>()); }