Skip to content

Commit

Permalink
Remove redundant input addition in workflows
Browse files Browse the repository at this point in the history
The code change deletes the line where the messageInput is added to the Inputs list of the builder in the `Workflows.cs` file, since this operation is redundant. The input is automatically added during its creation and doesn't need an explicit addition, thus improving code efficiency.
  • Loading branch information
sfmskywalker committed Feb 6, 2024
1 parent fa44259 commit 8d23d69
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ protected override void Build(IWorkflowBuilder builder)
var messageInput = builder.WithInput<string>("Message", "The message to write to the console.");

builder.Name = "Greeter Workflow";
builder.Inputs.Add(messageInput);
builder.Root = new WriteLine(context => context.GetInput<string>(messageInput));
}
}

0 comments on commit 8d23d69

Please sign in to comment.