18 lines
787 B
C#
18 lines
787 B
C#
using NodePipeline.Configuration.Abstractions;
|
|
using NodePipeline.Configuration.Abstractions.Interfaces;
|
|
using NodePipeline.Configuration.Abstractions.Models.Execute;
|
|
|
|
namespace NodePipeline.Configuration.Yaml.Loader;
|
|
|
|
public class YamlGraphLoader(IEditorPipelineConfigLoader? editorPipelineConfigLoader = null) : IPipelineConfigLoader
|
|
{
|
|
private readonly IEditorPipelineConfigLoader _editorPipelineConfigLoader = editorPipelineConfigLoader
|
|
?? new YamlEditorConfigLoader();
|
|
|
|
public PipelineConfig Load(Stream stream)
|
|
{
|
|
var editorConfig = _editorPipelineConfigLoader.Load(stream);
|
|
var config = EditorToRuntimePipelineConverter.ToRuntime(editorConfig);
|
|
return config;
|
|
}
|
|
} |