/// <summary> /// Create a complex pipeline, with a root node and two leaf nodes /// </summary> public static ProjectDOM.Pipeline CreateTreePipeline() { // create a pipeline var pipeline = new ProjectDOM.Pipeline(); // create root node and set it as root of the pipeline var nodeId = pipeline.AddRootNode("TestFilter2"); // create leaf nodes var node2Id = pipeline.AddNode("TestFilter1"); var node3Id = pipeline.AddNode("TestFilter1"); // set leaf node properties var nodeProps = pipeline.GetNode(node2Id).GetPropertiesForConfiguration("Root"); nodeProps.SetValue("Value1", "5"); nodeProps.SetValue("Value2", "7"); // set leaf node properties nodeProps = pipeline.GetNode(node3Id).GetPropertiesForConfiguration("Root"); nodeProps.SetValue("Value1", "5"); nodeProps.SetValue("Value2", "7"); // set root node properties nodeProps = pipeline.GetNode(nodeId).GetPropertiesForConfiguration("Root"); nodeProps.SetReferenceIds("Value1", node2Id); nodeProps.SetReferenceIds("Value2", node3Id); return(pipeline); }
public static ProjectDOM.Pipeline CreateArithmeticPipeline() { // create a pipeline var pipeline = new ProjectDOM.Pipeline(); var value1Id = pipeline.AddNode("AssignIntegerValue"); pipeline.GetNode(value1Id).GetPropertiesForConfiguration("Root").SetValue("Value", "5"); var value2Id = pipeline.AddNode("AssignIntegerValue"); pipeline.GetNode(value2Id).GetPropertiesForConfiguration("Root").SetValue("Value", "5"); var rootId = pipeline.AddRootNode("AddIntegerValues"); pipeline.GetNode(rootId).GetPropertiesForConfiguration("Root").SetReferenceIds("Value1", value1Id); pipeline.GetNode(rootId).GetPropertiesForConfiguration("Root").SetReferenceIds("Value2", value2Id); return(pipeline); }
/// <summary> /// Create a simple pipeline, with a single node that returns the sum of two values /// </summary> public static ProjectDOM.Pipeline CreateBasicPipeline() { // create a pipeline var pipeline = new ProjectDOM.Pipeline(); // create a node and set it as root of the pipeline var nodeId = pipeline.AddRootNode("TestFilter1"); // set node properties for "Root" Configuration var nodeProps = pipeline.GetNode(nodeId).GetPropertiesForConfiguration("Root"); nodeProps.SetValue("Value1", "5"); nodeProps.SetValue("Value2", "7"); return(pipeline); }
public ProjectDOM.Node GetNodeDOM(Guid id) { return(_PipelineDom.GetNode(id)); }
public static IEnumerable <ProjectDOM.Node> GetReferences(this ProjectDOM.Pipeline pipeline, ProjectDOM.Node parent, string jointCfg, string propertyName) { var ids = parent.GetReferenceIds(jointCfg, propertyName); return(ids.Select(item => pipeline.GetNode(item))); }
public static ProjectDOM.Node CreateRootNode(this ProjectDOM.Pipeline pipeline, string className) { var id = pipeline.AddRootNode(className); return(pipeline.GetNode(id)); }