From 8a89e65c90ca11bbaa327251a0c3e1a81aee161d Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Fri, 1 Dec 2023 20:51:49 +0100 Subject: [PATCH] Use more precise condition in #if The library can be embedded, so this is a better approach --- src/RazorBlade.Library/RazorTemplate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RazorBlade.Library/RazorTemplate.cs b/src/RazorBlade.Library/RazorTemplate.cs index c5ca3e9..e64bcef 100644 --- a/src/RazorBlade.Library/RazorTemplate.cs +++ b/src/RazorBlade.Library/RazorTemplate.cs @@ -182,7 +182,7 @@ protected internal virtual void Write(IEncodedContent? content) [EditorBrowsable(EditorBrowsableState.Never)] protected internal void DefineSection(string name, Func action) { -#if NETCOREAPP +#if NET6_0_OR_GREATER if (!_sections.TryAdd(name, action)) throw new InvalidOperationException($"Section '{name}' is already defined."); #else