コード例 #1
0
        /// <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
ファイル: ScriptNodeConfig.cs プロジェクト: tyranid/canape
 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));
 }
コード例 #5
0
 protected override Nodes.BasePipelineNode OnCreate(Utils.Logger logger, Nodes.NetGraph graph, Dictionary <string, object> stateDictionary)
 {
     return(new ParseWithPipelineNode());
 }