protected override TStream CreateOutputStream(ThroughFlatFileArgs <TIn, TStream> args) { var firstStreamWriter = args.TargetStream.Observable.First().Do(i => PreProcess(i, args.Mapping)).DelayTillEndOfStream(); var obs = args.MainStream.Observable .CombineWithLatest(firstStreamWriter, (i, r) => { ProcessValueToOutput(r, args.Mapping, i); return(i); }, true); return(CreateMatchingStream(obs, args.MainStream)); }
public ThroughFlatFileStreamNode(string name, ThroughFlatFileArgs <TIn, TStream> args) : base(name, args) { _serialize = args.Mapping.GetSerializer(); }