/// <summary> /// Append CSS element /// </summary> /// <param name="html">HTML helper</param> /// <param name="location">A location of the script element</param> /// <param name="src">Script path (minified version)</param> /// <param name="debugSrc">Script path (full debug version). If empty, then minified version will be used</param> /// <param name="excludeFromBundle">A value indicating whether to exclude this script from bundling</param> public static void AppendCssFileParts(this IHtmlHelper html, ResourceLocation location, string src, string debugSrc = "", bool excludeFromBundle = false) { IPageHeadBuilder pageHeadBuilder = ServiceProviderFactory.ServiceProvider.GetService <IPageHeadBuilder>(); pageHeadBuilder.AppendCssFileParts(location, src, debugSrc, excludeFromBundle); }
/// <summary> /// Append CSS element /// </summary> /// <param name="html">HTML helper</param> /// <param name="location">A location of the script element</param> /// <param name="part">CSS part</param> /// <param name="pageHeadBuilder"></param> public static void AppendCssFileParts(this HtmlHelper html, ResourceLocation location, string part, IPageHeadBuilder pageHeadBuilder = null) { if (pageHeadBuilder == null) pageHeadBuilder = EngineContext.Current.Resolve<IPageHeadBuilder>(); pageHeadBuilder.AppendCssFileParts(location, part); }