You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library helps at building simple [TPL Dataflow](https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/dataflow-task-parallel-library) pipelines,
6
8
that enforce the following guarantees:
7
9
@@ -100,15 +102,15 @@ the `Completion` property of the individual blocks. Observing this exception jus
100
102
this block was not the first that failed. It is possible that the `PipelineException`
101
103
may coexist with other exceptions in the same dataflow block.
102
104
103
-
## Discussion
105
+
## Comparison with Encapsulate
104
106
105
107
It might be helpful to compare the functionality offered by this library with the
106
108
functionality offered by the [`DataflowBlock.Encapsulate`](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.dataflow.dataflowblock.encapsulate) method.
107
109
The result of this method is similar with the result of the `ToPipeline` method: both return
108
110
an [`IPropagatorBlock<TInput, TOutput>`](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.dataflow.ipropagatorblock-2) implementation
109
111
(a block that is both a target and a source). The `DataflowBlock.Encapsulate`
110
112
accepts a `target` and a `source` block, and returns a propagator that delegates to
111
-
these two blocks. The two blocks are not linked automatically in any way, and the completion
113
+
these two blocks. The two blocks are **not** linked automatically in any way, and the completion
112
114
of the propagator represents the completion of the second (the `source`) block only.
113
115
On the contrary the `ToPipeline` returns a propagator that links all the dataflow
114
116
blocks tightly in both directions, and its `Completion` represents the completion of all its
@@ -129,7 +131,6 @@ bool received = receivable.TryReceive(out string item);
129
131
## Embedding the library into your project
130
132
131
133
You can install the [SimpleTplDataflowPipelines](https://www.nuget.org/packages/SimpleTplDataflowPipelines/) NuGet package.
You can also [download](https://github.com/theodorzoulias/SimpleTplDataflowPipelines/releases) the project and build it locally, or just
134
135
embed the single code file [`PipelineBuilder.cs`](https://github.com/theodorzoulias/SimpleTplDataflowPipelines/blob/main/src/SimpleTplDataflowPipelines/PipelineBuilder.cs)
0 commit comments