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;