Example #1
0
        public override ICompletes <TNewResult> AndThen <TNewResult>(Func <TResult, TNewResult> function)
        {
            var parent = Parent ?? this;
            var continuationCompletes = new RepeatableAndThenContinuation <TResult, TNewResult>(parent, this, function);

            parent.AndThenInternal(continuationCompletes);
            return(continuationCompletes);
        }
Example #2
0
        public override ICompletes <TNewResult> AndThen <TNewResult>(TNewResult failedOutcomeValue, Func <TResult, TNewResult> function)
        {
            var parent = Parent ?? this;
            var continuationCompletes = new RepeatableAndThenContinuation <TResult, TNewResult>(parent, this, Optional.Of(failedOutcomeValue), function);

            parent.AndThenInternal(continuationCompletes);
            return(continuationCompletes);
        }