From ede0da863e6c98b4db88026083cce07c4b0ec02a Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 16 Aug 2024 20:29:45 +0800 Subject: [PATCH] Add UserPreferences to DocumentRenderErrorEvent --- .../Volo/Docs/Documents/DocumentRenderErrorEvent.cs | 4 ++++ .../src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/DocumentRenderErrorEvent.cs b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/DocumentRenderErrorEvent.cs index 19e7b01227..f837c740e7 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/DocumentRenderErrorEvent.cs +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/DocumentRenderErrorEvent.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + namespace Volo.Docs.Documents; public class DocumentRenderErrorEvent @@ -7,4 +9,6 @@ public class DocumentRenderErrorEvent public string ErrorMessage { get; set; } public string Url { get; set; } + + public Dictionary UserPreferences { get; set; } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index b3ec299de9..970e967a98 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -592,7 +592,8 @@ namespace Volo.Docs.Pages.Documents.Project { ErrorMessage = e.Message, Name = Document.Name, - Url = Request.GetDisplayUrl() + Url = Request.GetDisplayUrl(), + UserPreferences = UserPreferences }); // Slow down with crawling