From d274dce16dd675a955bb61b62991f9e3420c859a Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Thu, 28 May 2026 11:00:22 +0200 Subject: [PATCH] Remove legacy way in BasicSerializer --- .../ImageSharp.Tests/TestUtilities/BasicSerializer.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/ImageSharp.Tests/TestUtilities/BasicSerializer.cs b/tests/ImageSharp.Tests/TestUtilities/BasicSerializer.cs index a34b9f291d..d5daa77556 100644 --- a/tests/ImageSharp.Tests/TestUtilities/BasicSerializer.cs +++ b/tests/ImageSharp.Tests/TestUtilities/BasicSerializer.cs @@ -28,7 +28,9 @@ internal class BasicSerializer : IXunitSerializationInfo foreach (KeyValuePair kv in this.map) { // Format: key:TypeAssemblyQualifiedName:value - writer.WriteLine($"{kv.Key}{Separator}{kv.Value.t.AssemblyQualifiedName}{Separator}{kv.Value.str}"); + writer.WriteLine( + $"{kv.Key}{Separator}{kv.Value.t.AssemblyQualifiedName}{Separator}{kv.Value.str}" + ); } writer.Flush(); @@ -44,18 +46,13 @@ internal class BasicSerializer : IXunitSerializationInfo Type type = Type.GetType(reader.ReadLine()); for (string s = reader.ReadLine(); s != null; s = reader.ReadLine()) { - // Format: key:TypeAQN:value (3 parts max to preserve ':' inside value) + // Format: key:TypeAssemblyQualifiedName:value string[] parts = s.Split(Separator, 3); if (parts.Length == 3) { Type valueType = Type.GetType(parts[1]) ?? typeof(string); this.map[parts[0]] = (parts[2], valueType); } - else if (parts.Length == 2) - { - // Legacy two-part format: key:value (no type info) - this.map[parts[0]] = (parts[1], typeof(string)); - } } return type;