public Node()
	{
		Neighbors = new List<Node>();
		Type = NodeTypeEnum.Normal;
		MoveableDirections = new HashSet<Direction>();

	}
示例#2
0
 public Node(string name, NodeTypeEnum nodeType, Node parent = null, string correlationKey = null)
 {
     Value          = name;
     NodeType       = nodeType;
     Parent         = parent;
     CorrelationKey = correlationKey ?? Guid.NewGuid().ToString();
 }
示例#3
0
 public PentagoNode(PentagoBoard currentState, PentagoNode parent)
     : base(parent.Depth + 1)
 {
     this.currentState = currentState;
     this.currentTurn  = parent.NextTurn();
     this.Parent       = parent;
     this.maxDepth     = parent.maxDepth;
     this.nodeType     = (parent.nodeType == NodeTypeEnum.MAX) ? NodeTypeEnum.MIN : NodeTypeEnum.MAX;
     //System.Diagnostics.Debug.WriteLine(Depth+" "+currentTurn.State);
 }
示例#4
0
 /// <summary>
 /// constructor for root node
 /// </summary>
 /// <param name="currentState">current board</param>
 /// <param name="currentTurn">current turn(who is moving now)</param>
 public PentagoNodeEx(PentagoBoard currentState, Status currentTurn, int maxDepth)
     : base(0)
 {
     this.CurrentState = currentState;
     this.currentTurn  = currentTurn;
     this.currentTurn  = this.NextTurn();
     this.Parent       = null;
     this.maxDepth     = maxDepth;
     this.nodeType     = NodeTypeEnum.MAX;
     System.Diagnostics.Debug.WriteLine(Depth);
 }
示例#5
0
 private TreeNode GetParentNodeByType(TreeNode oNode, NodeTypeEnum eType)
 {
     if (oNode.Type == eType)
     {
         return(oNode);
     }
     else
     {
         return(this.GetParentNodeByType(((TreeNode)oNode.Parent), eType));
     }
 }
示例#6
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type = type;
     if (NodeTypeEnum.END != Type)
         Children = new ArrayList();
     this.Parent = parent;
     if(parent != null)
         parent.AddChild(this);
     this.Axis = axis;
 }
示例#7
0
        //查询函数,返回节点列表中指定类型的所有节点
        public List <IfCoreNode> GetNodesOfType(NodeTypeEnum type)
        {
            List <IfCoreNode> ResultList = new List <IfCoreNode>();

            //遍历节点列表
            foreach (IfCoreNode curNode in NodeList)
            {
                if (curNode.Type.Type == type)
                {//将符合type要求的节点加入返回结果列表
                    ResultList.Add(curNode);
                }
            }
            return(ResultList);
        }
示例#8
0
        internal IEnumerable <TransitionInstanceEntity> GetTransitonInstance(string appName, int appInstanceID, Guid processGUID,
                                                                             NodeTypeEnum toActivityType)
        {
            var sql      = "SELECT * FROM WfTransitionInstance WHERE AppName=@appName AND AppInstanceID=@appInstanceID AND ProcessGUID=@processGUID AND ToActivityType=@toActivityType ORDER BY CreatedDateTime DESC";
            var nodeList = TransitionInstanceRepository.Query <TransitionInstanceEntity>(sql,
                                                                                         new
            {
                appName        = appName,
                appInstanceID  = appInstanceID,
                processGUID    = processGUID,
                toActivityType = toActivityType
            });

            return(nodeList);
        }
示例#9
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type       = type;
     if (NodeTypeEnum.END != Type)
     {
         Children = new ArrayList();
     }
     this.Parent = parent;
     if (parent != null)
     {
         parent.AddChild(this);
     }
     this.Axis = axis;
 }
示例#10
0
 public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
 {
     this.IsKinectJoint = isKinectJoint;
     this.JointIndex = index;
     Name = isKinectJoint ? index.ToString() : name;
     this.BaseAxis = axis;
     this.Type = type;
     if(Type != NodeTypeEnum.END)
         Children = new ArrayList();
     if (null != parent)
     {
         this.Parent = parent;
         parent.AddChild(this);
     }
 }
示例#11
0
 public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
 {
     this.IsKinectJoint = isKinectJoint;
     this.JointIndex    = index;
     Name          = isKinectJoint ? index.ToString() : name;
     this.BaseAxis = axis;
     this.Type     = type;
     if (Type != NodeTypeEnum.END)
     {
         Children = new ArrayList();
     }
     if (null != parent)
     {
         this.Parent = parent;
         parent.AddChild(this);
     }
 }
示例#12
0
 public static List <INode> Get(NodeTypeEnum @enum)
 {
     return(servers.Where(m => m.Node.NodeType == @enum).Select(m => m.Node).ToList());
 }
示例#13
0
 //连边类型构造函数
 public NodeType(string sTypeName)
 {
     intType = NameToType(sTypeName);
 }
示例#14
0
 //连边类型构造函数
 public NodeType(NodeTypeEnum iType)
 {
     intType = iType;
 }
示例#15
0
 public void SetConditionNodeType(NodeTypeEnum value)
 {
     this.ConditionNodeType = (int)value;
 }
 /// <summary>
 /// Formula node
 /// </summary>
 protected BaseFormulaNode(NodeTypeEnum typeKey)
 {
     TypeKey = typeKey;
 }
示例#17
0
 public TreeNode GetParentNodeByType(NodeTypeEnum eType)
 {
     return(this.GetParentNodeByType(this, eType));
 }
示例#18
0
 public PropertyNode(string name, NodeTypeEnum nodeType, string correlationKey = null, Node parent = null) : base(name, nodeType, parent, correlationKey)
 {
 }
示例#19
0
 public BaseNode(string Name, NodeTypeEnum NodeType)
 {
     _name = Name;
     _nodeType = NodeType;
     _childNodes = new ArrayList();
 }
示例#20
0
 public BaseNode(string Name, NodeTypeEnum NodeType)
 {
     _name       = Name;
     _nodeType   = NodeType;
     _childNodes = new ArrayList();
 }
示例#21
0
 public NodeProperty(int nodeId, NodeTypeEnum nodeType)
 {
     NodeId   = nodeId;
     NodeType = nodeType;
 }
示例#22
0
 public ValueNode(string value, NodeTypeEnum nodeType, Node parent = null) :
     base(value, nodeType, parent, null)
 {
 }