Esempio n. 1
0
 /// <summary>
 /// Adds to body.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <returns></returns>
 public HtmlBuilder AddToBody(HtmlElement element)
 {
     Root.Body.AddChild(element);
     return(this);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlBuilder"/> class.
 /// </summary>
 /// <param name="head">The head.</param>
 /// <param name="body">The body.</param>
 public HtmlBuilder(HtmlElement head, HtmlElement body)
 {
     Root = new HtmlRoot(head, body);
 }
Esempio n. 3
0
 /// <summary>
 /// Adds to head.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <returns></returns>
 public HtmlBuilder AddToHead(HtmlElement element)
 {
     Root.Head.AddChild(element);
     return(this);
 }
Esempio n. 4
0
        /// <summary>
        /// Builds this instance.
        /// </summary>
        /// <returns></returns>
        public string Build()
        {
            var html = new HtmlElement(HtmlTag.Html, Head.Build() + Body.Build(), _attributes);

            return(html.Build());
        }