protected virtual void RenderingStartDiagnostics()
{
if (!DiagnosticsEnabled) return;
//<!-- Begin Rendering "~/bar/Foo.ascx" -->
//<!-- Rendering was output cached at {datetime}, VaryByData, CachingID = "loremipsum" -->
var comment = new StringBuilder();
comment.AppendFormat("<!-- Begin Rendering {0} -->\n", _renderingName);
if (!_cacheable)
{
_writer.Write(comment.ToString());
return;
}
comment.AppendFormat("<!-- Rendering was output cached at {0}", DateTime.Now);
if (_clearOnIndexUpdate)
comment.Append(", ClearOnIndexUpdate");
if (_varyByData)
comment.Append(", VaryByData");
if (_varyByDevice)
comment.Append(", VaryByDevice");
if (_varyByLogin)
comment.Append(", VaryByLogin");
if (_varyByParm)
comment.Append(", VaryByParm");
if (_varyByQueryString)
comment.Append(", VaryByQueryString");
if (_varyByUser)
comment.Append(", VaryByUser");
if (!string.IsNullOrEmpty(_varyByCustom))
comment.AppendFormat(", VaryByCustom=\"{0}\"", HttpUtility.HtmlEncode(_varyByCustom));
comment.Append(" -->");
_writer.Write(comment.ToString());
_timer.Start();
}