Private would be QueryHandler<T, Bar> and Foo would be QueryHandler<Bar, X> so the output of Private (the last handler in pipeline one) would have to match the input of Foo (the first handler in pipeline two).
This is tricky to implement, however. This might require some extension methods that are a bit onerous to build and which also might require another generic type parameter for the Pipe method (specifying the TResponse type of the last query handler in the chain).
Would have to play with this to see if it's doable.
This might look something like this:
Private would be
QueryHandler<T, Bar>
and Foo would beQueryHandler<Bar, X>
so the output of Private (the last handler in pipeline one) would have to match the input of Foo (the first handler in pipeline two).This is tricky to implement, however. This might require some extension methods that are a bit onerous to build and which also might require another generic type parameter for the
Pipe
method (specifying the TResponse type of the last query handler in the chain).Would have to play with this to see if it's doable.