コード例 #1
0
        public HtmlFluentNestedBuilder AppendToParentChildren(string name = null, string text = null, int indentSize = 2)
        {
            var el = new HtmlFluentNestedBuilder(name, text, indentSize);

            Children.Last().Children.Add(el);
            return(el);
        }
コード例 #2
0
        public HtmlFluentNestedBuilder AppendToChildren(string name = null, string text = null, int indentSize = 2)
        {
            // will append element to current root
            var el = new HtmlFluentNestedBuilder(name, text, indentSize);

            Children.Add(el);
            return(this);
        }
コード例 #3
0
        public static void Run()
        {
            var root = new HtmlFluentNestedBuilder("root");

            root
            .AppendElement("nest1", "Osama")
            .ThenAppendElement("nest1-2", "nour")
            .AppendElement();
            WriteLine(root);
        }