From aa25541c723a60393dc8d3a8b16f7e51c9370a0d Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Thu, 21 Nov 2024 10:30:45 -0800 Subject: [PATCH] Update src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs Co-authored-by: Fred Silberberg --- .../ObjectReaders_ProjectSystem.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs b/src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs index f1f53df675..f04eed3270 100644 --- a/src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs +++ b/src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs @@ -36,13 +36,12 @@ internal static partial class ObjectReaders public static ProjectWorkspaceState ReadProjectWorkspaceStateFromProperties(JsonDataReader reader) { + var tagHelpers = reader.ReadImmutableArrayOrEmpty(nameof(ProjectWorkspaceState.TagHelpers), + static r => ReadTagHelper(r #if JSONSERIALIZATION_ENABLETAGHELPERCACHE - var tagHelpers = reader.ReadImmutableArrayOrEmpty(nameof(ProjectWorkspaceState.TagHelpers), - static r => ReadTagHelper(r, useCache: true)); -#else - var tagHelpers = reader.ReadImmutableArrayOrEmpty(nameof(ProjectWorkspaceState.TagHelpers), - static r => ReadTagHelper(r)); + , useCache: true #endif + )); var csharpLanguageVersion = (LanguageVersion)reader.ReadInt32OrZero(nameof(ProjectWorkspaceState.CSharpLanguageVersion));