Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var zipCodePipe = new InputPipe<ZipCode>("zipCode");
var peanutButtersPipe = zipCodePipe.ProcessFunction( PeanutButterShop.GetAvailable);
var jelliesPipe = zipCodePipe.ProcessFunction(JellyShop.GetAvailable);
var bestPeanutButterPipe = peanutButtersPipe.Process(_ => _.BestPeanutButter);
var bestJelliesPipe = jelliesPipe.Process(_ => _.BestJelly);
var joinedPipe = bestPeanutButterPipe.JoinTo(bestJelliesPipe);
var sandwichPipe = joinedPipe.Process((bestPeanutButter, bestJelly) =>
Sandwich.Create(bestPeanutButter, bestJelly));
sandwichPipe.Collect();
var inputs1AndOutputs1 = peanutButtersPipe.GetInputs<ZipCode>().AndOutputs<Sandwich>();
inputs1AndOutputs1.Send(zipCode);
return inputs1AndOutputs1.Output1.SingleResult;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment