Exemplo n.º 1
0
 private static void Go(Tag node, List<Tag> toList)
 {
     toList.Add(node);
     foreach (Tag tag in node.InnerTags)
     {
         Flatten.Go(tag, toList);
     }
 }
Exemplo n.º 2
0
 public static List<Tag> Go(Tag root)
 {
     List<Tag> ret = new List<Tag>();
     Go(root, ret);
     return ret;
 }
Exemplo n.º 3
0
        private int GetInnerTags(string innerContent)
        {
            int len = 0;
            string leftToEvaluate = innerContent;
            Tag inner = new Tag(leftToEvaluate);
            while (inner.IsValid)
            {
                this.InnerTags.Add(inner);
                int innerLength = inner.Start + inner.Length;
                len += innerLength;
                leftToEvaluate = leftToEvaluate.Substring(innerLength, leftToEvaluate.Length - innerLength);
                inner = new Tag(leftToEvaluate);
            }

            return len;
        }