Ejemplo n.º 1
0
        public static void Pipe(this Stream source, Stream destination, byte[] buffer, Action continuation, Action<Exception> error)
        {
            var scheduler = Daemons.CurrentScheduler;

            Action scheduledContinuation = () => scheduler.Schedule(continuation);
            Action<Exception> scheduledError = (e) => scheduler.Schedule(() => error(e));

            var streamPipe = new StreamPipe(source, destination, buffer, scheduledContinuation, scheduledError);
            streamPipe.Start();
        }
Ejemplo n.º 2
0
        public static void Pipe(this Stream source, Stream destination, byte[] buffer, Action continuation, Action <Exception> error)
        {
            var scheduler = Daemons.CurrentScheduler;

            Action             scheduledContinuation = () => scheduler.Schedule(continuation);
            Action <Exception> scheduledError        = (e) => scheduler.Schedule(() => error(e));

            var streamPipe = new StreamPipe(source, destination, buffer, scheduledContinuation, scheduledError);

            streamPipe.Start();
        }