public HeroUnitBuilder <TModel> Begin(HeroUnit.HeroUnit heroUnit)
        {
            if (heroUnit == null)
            {
                throw new ArgumentNullException(nameof(heroUnit));
            }

            return(new HeroUnitBuilder <TModel>(_helper, heroUnit));
        }
Exemple #2
0
        internal HeroUnitBuilder(HtmlHelper <TModel> htmlHelper, HeroUnit heroUnit)
            : base(htmlHelper, heroUnit)
        {
            base.TxtWriter.Write("<h1>");
            base.TxtWriter.Write(heroUnit.Heading);
            base.TxtWriter.Write("</h1>");

            base.TxtWriter.Write("<p>");
            base.TxtWriter.Write(heroUnit.Tagline);
            base.TxtWriter.Write("</p>");

            base.TxtWriter.Write("<p>");
        }