Sep 4, 2018 · 1 min read
Nicolas,
Could you try out my `Outcome<T>` library which has support for Promise-like chaining for async methods, and share your thoughts?
https://github.com/sameera/Codoxide.Outcome
For example you can do something like this (even with nested async calls) and it will neatly flatten everything out:
await this.DoAsyncParameterizedOutcome(100d)
.Then(number => {
return this.DoAsyncParameterizedOutcome(number);
}).Then(result => {
result.Should().BeOfType(typeof(double));
return this.DoAsyncOutcome();
}).Then(result => {
result.Should().Be(_theResult);
});