protected virtual void Dispose(bool disposing) { if (disposing && DiagnosticsEnabled) RenderingEndDiagnostics(); }