I want to combine multiple IncrementalValuesProvider<T>
I don't find var result = a.Combine(b.Combine(c));
very appealing, because result.Left.Left
and result.Right.Left
etc are not intuitive at all.
Is there some way I can combine multiple IncrementalValuesProvider<T>
into a single custom object? For example
IncrementalValuesProvider<One> one = ...;
IncrementalValuesProvider<Two> two = ...;
IncrementalValuesProvider<Three> three = ...;
IncrementalValuesProvider<Combined> = one.Combine(two.Collect())
.Select(x => new { One = x.Left, Two = x.Right })
.Combine(three.Collect())
.Select(x => new Combined {
One = x.Left.One,
Two = x.Left.Two,
Three = x.Right
});
Absolutely anything will do as long as I don't have to keep traversing left/left/right/left :)