.NET: [BREAKING] refactor: Normalize WorkflowBuilder APIs (#1935)

* [BREAKING] refactor: Normalize WorkflowBuilder APIs

* "partitioner" => "assigner"
* normalize ordering so sources always to the left of targets for edges
* normalize parameter ordering so sources and targets are always first arguments
* remove `params` (users should use collection expressions instead)

* refactor: Align name with Python
This commit is contained in:
Jacob Alber
2025-11-05 14:50:01 -05:00
committed by GitHub
Unverified
parent 33f84f9ed2
commit 94a5ba3448
12 changed files with 96 additions and 67 deletions
@@ -26,8 +26,8 @@ public static class Program
// Build the workflow by connecting executors sequentially
var workflow = new WorkflowBuilder(fileRead)
.AddFanOutEdge(fileRead, targets: [wordCount, paragraphCount])
.AddFanInEdge(aggregate, sources: [wordCount, paragraphCount])
.AddFanOutEdge(fileRead, [wordCount, paragraphCount])
.AddFanInEdge([wordCount, paragraphCount], aggregate)
.WithOutputFrom(aggregate)
.Build();