diff --git a/sandbox/GeneratorSandbox/GeneratorSandbox.csproj b/sandbox/GeneratorSandbox/GeneratorSandbox.csproj index fc3ffc24..bee2c7a1 100644 --- a/sandbox/GeneratorSandbox/GeneratorSandbox.csproj +++ b/sandbox/GeneratorSandbox/GeneratorSandbox.csproj @@ -15,7 +15,7 @@ - + Analyzer false diff --git a/src/ZLogger/Internal/MagicalBox.cs b/src/ZLogger/Internal/MagicalBox.cs index 5f8fee3a..d4a72d99 100644 --- a/src/ZLogger/Internal/MagicalBox.cs +++ b/src/ZLogger/Internal/MagicalBox.cs @@ -282,11 +282,17 @@ static void ThrowArgumentOutOfRangeException() static class ReaderCache { - readonly record struct Handlers( - delegate* managed Utf8JsonWriter, - delegate* managed StringHandler, // box, offset, handler, alignment, format - delegate* managed>, int, string?, bool> Utf8StringWriter, - delegate* managed ReadBoxed); + sealed class Handlers( + delegate* managed utf8JsonWriter, + delegate* managed stringHandler, // box, offset, handler, alignment, format + delegate* managed>, int, string?, bool> utf8StringWriter, + delegate* managed readBoxed) + { + public readonly delegate* managed Utf8JsonWriter = utf8JsonWriter; + public readonly delegate* managed StringHandler = stringHandler; + public readonly delegate* managed>, int, string?, bool> Utf8StringWriter = utf8StringWriter; + public readonly delegate* managed ReadBoxed = readBoxed; + } static readonly ConcurrentDictionary cache = new(); diff --git a/tests/ZLogger.Generator.Tests/ZLogger.Generator.Tests.csproj b/tests/ZLogger.Generator.Tests/ZLogger.Generator.Tests.csproj index f90093cb..e324433e 100644 --- a/tests/ZLogger.Generator.Tests/ZLogger.Generator.Tests.csproj +++ b/tests/ZLogger.Generator.Tests/ZLogger.Generator.Tests.csproj @@ -17,7 +17,7 @@ - +