Exemple #1
0
 /// <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);
         }
     });
 }
Exemple #2
0
        /// <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);
                }
            });
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        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;
        }