From 3eb9de57ef88de32c9899d2d019ef5daabd2e4df Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 19 Mar 2024 13:53:05 -0400 Subject: [PATCH] fix #4017 - SiteState being lost in server rendered scenarios --- .../Extensions/OqtaneServiceCollectionExtensions.cs | 3 --- Oqtane.Server/Infrastructure/SiteState.cs | 9 --------- Oqtane.Server/Infrastructure/TenantManager.cs | 2 +- .../Modules/HtmlText/Repository/HtmlTextRepository.cs | 2 +- Oqtane.Server/Repository/PermissionRepository.cs | 2 +- 5 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 Oqtane.Server/Infrastructure/SiteState.cs diff --git a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs index 8f73661df..2fd109bac 100644 --- a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs +++ b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs @@ -99,9 +99,6 @@ internal static IServiceCollection AddOqtaneServerScopedServices(this IServiceCo services.AddScoped(); services.AddScoped(); - // alternative used within infrastructure classes - services.AddScoped(); - return services; } diff --git a/Oqtane.Server/Infrastructure/SiteState.cs b/Oqtane.Server/Infrastructure/SiteState.cs deleted file mode 100644 index d765f90dd..000000000 --- a/Oqtane.Server/Infrastructure/SiteState.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Oqtane.Models; - -namespace Oqtane.Infrastructure -{ - public class SiteState - { - public Alias Alias { get; set; } - } -} diff --git a/Oqtane.Server/Infrastructure/TenantManager.cs b/Oqtane.Server/Infrastructure/TenantManager.cs index 92191f4e6..ea342fc78 100644 --- a/Oqtane.Server/Infrastructure/TenantManager.cs +++ b/Oqtane.Server/Infrastructure/TenantManager.cs @@ -1,9 +1,9 @@ using System; -using System.IO; using System.Linq; using Microsoft.AspNetCore.Http; using Oqtane.Models; using Oqtane.Repository; +using Oqtane.Shared; namespace Oqtane.Infrastructure { diff --git a/Oqtane.Server/Modules/HtmlText/Repository/HtmlTextRepository.cs b/Oqtane.Server/Modules/HtmlText/Repository/HtmlTextRepository.cs index 51a0055d4..2ed63f69e 100644 --- a/Oqtane.Server/Modules/HtmlText/Repository/HtmlTextRepository.cs +++ b/Oqtane.Server/Modules/HtmlText/Repository/HtmlTextRepository.cs @@ -2,10 +2,10 @@ using Oqtane.Documentation; using System.Collections.Generic; using Microsoft.Extensions.Caching.Memory; -using Oqtane.Infrastructure; using System; using Microsoft.EntityFrameworkCore; using System.Threading.Tasks; +using Oqtane.Shared; namespace Oqtane.Modules.HtmlText.Repository { diff --git a/Oqtane.Server/Repository/PermissionRepository.cs b/Oqtane.Server/Repository/PermissionRepository.cs index 7d82ded9c..1a3b03950 100644 --- a/Oqtane.Server/Repository/PermissionRepository.cs +++ b/Oqtane.Server/Repository/PermissionRepository.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore; using Oqtane.Models; using Microsoft.Extensions.Caching.Memory; -using Oqtane.Infrastructure; +using Oqtane.Shared; namespace Oqtane.Repository {