Пример #1
0
 public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
 {
     output.SuppressOutput();
     if (!string.IsNullOrEmpty(Part))
     {
         _pageHeadBuilder.AddPageCssClassParts(Part);
     }
     return(Task.CompletedTask);
 }
Пример #2
0
        /// <summary>
        /// Add CSS class to the <![CDATA[<head>]]> element
        /// </summary>
        /// <param name="html">HTML helper</param>
        /// <param name="part">CSS class</param>
        public static void AddPageCssClassParts(this IHtmlHelper html, string part)
        {
            IPageHeadBuilder pageHeadBuilder = ServiceProviderFactory.ServiceProvider.GetService <IPageHeadBuilder>();

            pageHeadBuilder.AddPageCssClassParts(part);
        }