Tuesday, February 4, 2020

Pipelines / Refactor-to-Async with Jay and Llewellyn Tuesday @ 2:10pm


            var zipCodePipe = new InputPipe<ZipCode>("zipCode");
            var peanutButtersPipe = zipCodePipe.ProcessFunction(PeanutButterShop.GetAvailable);
            var jelliesPipe = zipCodePipe.ProcessFunction(JellyShop.GetAvailable);
            var bestSandwichPipe = peanutButtersPipe.JoinTo(jelliesPipe)
                .Process((p, j) => Sandwich.Create(p.BestPeanutButter, j.BestJelly));
            var bestSandwichCollector = bestSandwichPipe.Collect();



No comments:

Post a Comment