Пример #1
0
            public override async Task Run()
            {
                var pipeline = _pipelineFactory.BuildPipeline();

                foreach (var input in Enumerable.Repeat(1, 20))
                {
                    pipeline.Input.Post(input);
                }

                // this stops the input from receiving more data, and has all the blocks propagate their completion
                pipeline.Input.Complete();

                await pipeline.Completion;
            }