From d769917a2495c3a28f1c27cba09300233452671e Mon Sep 17 00:00:00 2001 From: Carnagion Date: Sun, 7 Aug 2022 18:05:06 +0200 Subject: [PATCH 1/3] Avoid using buggy ContainsAll() --- README.md | 2 +- Serialization/Serializer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cba216e..272e730 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It supports (de)serialization of almost any C# type including collections and ma **GDSerializer** is available as a [NuGet package](https://www.nuget.org/packages/GDSerializer/), which can be installed either through an IDE or by manually including the following lines in a Godot project's `.csproj` file: ```xml - + ``` Its dependencies may need to be installed as well, in a similar fashion. diff --git a/Serialization/Serializer.cs b/Serialization/Serializer.cs index bac733f..77d4666 100644 --- a/Serialization/Serializer.cs +++ b/Serialization/Serializer.cs @@ -345,7 +345,7 @@ public XmlNode Serialize(object instance, Type? type = null) .Where(pair => pair.Item2 is not null && pair.Item2.Serializable) .Select(pair => pair.member) .ToArray(); - if (toDeserialize.Any() && !deserialized.Select(pair => pair.Item2).ContainsAll(toDeserialize)) + if (toDeserialize.Any() && !toDeserialize.All(deserialized.Select(pair => pair.Item2).Contains)) { throw new SerializationException(node, $"One or more mandatory properties or fields of {type.GetDisplayName()} were not deserialized"); } From bf4f85e45b109c8a28dafd1751f0a3140029b69f Mon Sep 17 00:00:00 2001 From: Carnagion Date: Sun, 7 Aug 2022 18:06:06 +0200 Subject: [PATCH 2/3] Update csproj file --- GDSerializer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GDSerializer.csproj b/GDSerializer.csproj index 0c2133a..2128b12 100644 --- a/GDSerializer.csproj +++ b/GDSerializer.csproj @@ -8,7 +8,7 @@ true true - 2.0.1 + 2.0.2 GDSerializer Carnagion An XML (de)serialization framework for Godot's C# API. From b0467ba9b871745a283a855d6589625849ab6686 Mon Sep 17 00:00:00 2001 From: Carnagion Date: Sun, 7 Aug 2022 18:06:40 +0200 Subject: [PATCH 3/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de13a43..9976fa7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It supports (de)serialization of almost any C# type including collections and ma **GDSerializer** is available as a [NuGet package](https://www.nuget.org/packages/GDSerializer/), which can be installed either through an IDE or by manually including the following lines in a Godot project's `.csproj` file: ```xml - + ``` Its dependencies may need to be installed as well, in a similar fashion.