Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        public static Guid AddRootNode(this ProjectDOM.Pipeline pipeline, string className)
        {
            var id = pipeline.AddNode(className);

            pipeline.RootIdentifier = id;

            return(id);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 private void _SetCurrentRootNode(Factory.ContentFilterInfo t)
 {
     _PipelineDom.ClearNodes();
     _PipelineDom.RootIdentifier = _PipelineDom.AddNode(t);
     UpdateGraph();
 }
Exemplo n.º 5
0
        public static ProjectDOM.Node CreateNode(this ProjectDOM.Pipeline pipeline, string className)
        {
            var id = pipeline.AddNode(className);

            return(pipeline.GetNode(id));
        }