summaryrefslogtreecommitdiff
path: root/src/marlin.core/models/meta/RecipeStep.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
commitdf0737e55afeb5c01eb39909605970d1d3a73ffc (patch)
tree09823eaa310c60eefd2420dc305acae45c81900f /src/marlin.core/models/meta/RecipeStep.cs
parentee69ce25b2fba871920260028bb10c2d6b62b26f (diff)
refactor: cleanup; feat: connection to agent
Diffstat (limited to 'src/marlin.core/models/meta/RecipeStep.cs')
-rw-r--r--src/marlin.core/models/meta/RecipeStep.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/marlin.core/models/meta/RecipeStep.cs b/src/marlin.core/models/meta/RecipeStep.cs
new file mode 100644
index 0000000..afe77cf
--- /dev/null
+++ b/src/marlin.core/models/meta/RecipeStep.cs
@@ -0,0 +1,28 @@
+namespace marlin.core.models.meta;
+
+public class RecipeStep : AbstractStep
+{
+ public RecipeStep(string id) : base(id)
+ {
+ }
+
+ public string? BaseId { get; set; }
+ public CleanupStep? Cleanup { get; set; }
+ public Dictionary<string, Artifact> Artifacts { get; set; } = new();
+ public List<string> Ingest { get; set; } = new();
+
+ public RecipeStep? GetBase(Workflow workflow) =>
+ this.BaseId != null ? workflow.Steps[this.BaseId] : null;
+
+ public override IEnumerable<AbstractStep> GetAncestorsAndThis(Workflow workflow)
+ {
+ yield return this;
+
+ var step = this.GetBase(workflow);
+ while (step != null)
+ {
+ yield return step;
+ step = step.GetBase(workflow);
+ }
+ }
+}