From 8aadb10bb99319c5d76c8a50f7606cc3c6459cba Mon Sep 17 00:00:00 2001 From: Alex Yakunin Date: Tue, 28 Nov 2023 23:58:50 -0800 Subject: [PATCH] fix: .NET 8 build --- src/Stl.Fusion.Blazor/Components/ComponentExt.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Stl.Fusion.Blazor/Components/ComponentExt.cs b/src/Stl.Fusion.Blazor/Components/ComponentExt.cs index 29682650..9d0ce99a 100644 --- a/src/Stl.Fusion.Blazor/Components/ComponentExt.cs +++ b/src/Stl.Fusion.Blazor/Components/ComponentExt.cs @@ -1,9 +1,6 @@ -#if !NET8_0_OR_GREATER using System.Reflection.Emit; -#else -using Microsoft.AspNetCore.Components.Rendering; -#endif using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.RenderTree; namespace Stl.Fusion.Blazor; @@ -87,7 +84,7 @@ public static bool ShouldSetParameters(this ComponentBase component, ParameterVi return componentInfo.ShouldSetParameters(component, parameterView) || !component.IsInitialized(); } -#if USE_UNSAFE_ACCESSORS && NET8_0_OR_GREATER +#if !(USE_UNSAFE_ACCESSORS && NET8_0_OR_GREATER) static ComponentExt() { var bfInstanceNonPublic = BindingFlags.Instance | BindingFlags.NonPublic;