/// <inheritdoc/> public PipelineComponent Clone(Pipeline intoTargetPipeline) { var cataRepo = (ICatalogueRepository)intoTargetPipeline.Repository; var clone = new PipelineComponent(cataRepo, intoTargetPipeline, GetClassAsSystemType(), Order); foreach (var argument in PipelineComponentArguments) { argument.Clone(clone); } clone.Name = Name; clone.SaveToDatabase(); return(clone); }
/// <inheritdoc/> public PipelineComponent Clone(Pipeline intoTargetPipeline) { var cataRepo = (ICatalogueRepository)intoTargetPipeline.Repository; var clone = new PipelineComponent(cataRepo, intoTargetPipeline, GetClassAsSystemType(), Order); foreach (IPipelineComponentArgument argument in PipelineComponentArguments) { var cloneArg = new PipelineComponentArgument(cataRepo, clone); cloneArg.Name = argument.Name; cloneArg.Value = argument.Value; cloneArg.SetType(argument.GetSystemType()); cloneArg.Description = argument.Description; cloneArg.SaveToDatabase(); } clone.Name = Name; clone.SaveToDatabase(); return(clone); }