Esempio n. 1
0
        protected override IStream <Stream> CreateOutputStream(ThroughLocalFileArgs <TParams> args)
        {
            var outputFilePath   = args.ParamStream.Observable.Map(args.GetOutputFilePath);
            var outputObservable = args.Stream.Observable.CombineWithLatest(outputFilePath, (l, r) =>
            {
                l.Seek(0, SeekOrigin.Begin);
                using (var fileStream = File.OpenWrite(r))
                    l.CopyTo(fileStream);
                return(l);
            }, true);

            return(base.CreateUnsortedStream(outputObservable));
        }
Esempio n. 2
0
 public ThroughLocalFileStreamNode(string name, ThroughLocalFileArgs <TParams> args) : base(name, args)
 {
 }