示例#1
0
        public void ContinueWith <TContinuationOutput>(StartableBlock <TContinuationOutput> continuationBlock, bool ignoreSelfOutput = true)
        {
            if (ignoreSelfOutput)
            {
                Output.IgnoreOutput();
            }

            Completion.ContinueWith(x =>
            {
                if (x.IsFaulted)
                {
                    continuationBlock.Output.Fault(x.Exception);
                }
                else
                {
                    continuationBlock.Start();
                }
            });
        }
示例#2
0
 public StartableBlock(StartableBlock <TOutput> source, ProcessingBlock <TOutput> output, Task completion)
     : this(source.Start, output.Processor, source.EstimatedOutputCount, completion, true)
 {
 }