示例#1
0
 public static IHtmlString TimeScript(this WebPageBase page, string name, string html) =>
 new HtmlString(ClientTimingHelper.TimeScript(name, html));
 /// <summary>
 /// To be used inline in razor pages - times a script be sure to call <c>InitClientTimings</c> first
 /// </summary>
 public static IHtmlString TimeScript(this WebPageBase page, string name, IHtmlString html)
 {
     return(new HtmlString(ClientTimingHelper.TimeScript(name, html.ToHtmlString())));
 }
示例#3
0
 public static IHtmlString TimeScript(this WebPageBase page, string name, Func <object, HelperResult> html) =>
 new HtmlString(ClientTimingHelper.TimeScript(name, html(null).ToHtmlString()));
        /// <summary>
        /// To be used inline in razor pages - times a script be sure to call <c>InitClientTimings</c> first
        /// </summary>
        public static IHtmlString TimeScript(this WebPageBase page, string name, Func <object, HelperResult> html)
        {
            var result = html(null).ToHtmlString();

            return(new HtmlString(ClientTimingHelper.TimeScript(name, result)));
        }