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

            return(new HeroUnitBuilder <TModel>(_helper, heroUnit));
        }
예제 #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>");
        }