/// <summary> /// 给定一个bnode列表,转换其中的bnode /// </summary> /// <param name="bNodeList"></param> public static void Iterate(List<IBNode> bNodeList) { KeyValueVisitor visitor = new KeyValueVisitor(); bNodeList.ForEach(node => { // 如果是一个KeyValue Node if (node is KeyValueNode) { (node as KeyValueNode).Accept(visitor); } }); }
/// <summary> /// 给定一个bnode列表,转换其中的bnode /// </summary> /// <param name="bNodeList"></param> public static void Iterate(List <IBNode> bNodeList) { KeyValueVisitor visitor = new KeyValueVisitor(); bNodeList.ForEach(node => { // 如果是一个KeyValue Node if (node is KeyValueNode) { (node as KeyValueNode).Accept(visitor); } }); }
public void Modify() { if (_bRootNode == null) return; KeyValueVisitor visitor = new KeyValueVisitor(); var bNodeList = _btAnalyser.BNodeList; for (int i = 0; i < bNodeList.Count; ++i) { var node = bNodeList[i]; // 只需要更新KeyValueNode的值 if (node is KeyValueNode) { node.Accept(visitor); } } _tRootNode = null; }
public void Modify() { if (_bRootNode == null) { return; } KeyValueVisitor visitor = new KeyValueVisitor(); var bNodeList = _btAnalyser.BNodeList; for (int i = 0; i < bNodeList.Count; ++i) { var node = bNodeList[i]; // 只需要更新KeyValueNode的值 if (node is KeyValueNode) { node.Accept(visitor); } } _tRootNode = null; }