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

            return(new HeroUnitBuilder <TModel>(_helper, heroUnit));
        }
Esempio n. 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>");
        }