/// <summary>
        /// On Create method
        /// </summary>
        /// <param name="logger">The logger for use during creation</param>
        /// <param name="graph">The containing graph</param>
        /// <param name="stateDictionary">Current state dictionary</param>
        /// <returns></returns>
        protected override BasePipelineNode OnCreate(Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
        {
            if (Factory == null)
            {
                throw new NodeFactoryException(CANAPE.Properties.Resources.NetGraphContainerFactory_MustSpecifyGraph);
            }

            // Check if we have already created this node as part of a pairing
            if (stateDictionary.ContainsKey(Id.ToString()))
            {
                return((BasePipelineNode)stateDictionary[Id.ToString()]);
            }

            NetGraphContainerNode ret = new NetGraphContainerNode(Label, Factory, Direction, graph, logger, stateDictionary, LinkedNode != null);

            if (LinkedNode != null)
            {
                stateDictionary[LinkedNode.Id.ToString()] = new NetGraphContainerNode(ret, logger);
            }

            return(ret);
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="logger">The logger to use</param>
 /// <param name="graph">The hosting graph</param>
 /// <param name="stateDictionary"></param>
 /// <returns>The created pipeline node</returns>
 protected override Nodes.BasePipelineNode OnCreate(Utils.Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
 {
     return(new SwitchNode(DropUnknown, Mode));
 }
示例#3
0
 protected override Nodes.BasePipelineNode OnCreate(Utils.Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
 {
     return(new ScriptNode(_scriptMethod));
 }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="graph"></param>
 /// <param name="stateDictionary"></param>
 /// <returns></returns>
 protected override Nodes.BasePipelineNode OnCreate(Utils.Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
 {
     return(new DecisionNode(PathName));
 }
 protected override Nodes.BasePipelineNode OnCreate(Utils.Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
 {
     return(new ParseWithPipelineNode());
 }