From 894fd25a18cd5ddf31a905860aca95c438894efd Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 20 Jan 2018 21:29:47 -0500 Subject: [PATCH] move converters into namespace --- src/SMAPI/Framework/Models/Manifest.cs | 1 + src/SMAPI/Framework/Models/ModDataRecord.cs | 1 + .../Serialisation/{ => Converters}/ColorConverter.cs | 2 +- .../Serialisation/{ => Converters}/PointConverter.cs | 2 +- .../{ => Converters}/RectangleConverter.cs | 2 +- .../Serialisation/{ => Converters}/SFieldConverter.cs | 2 +- .../{ => Converters}/StringEnumConverter.cs | 2 +- src/SMAPI/Framework/Serialisation/JsonHelper.cs | 1 + src/SMAPI/StardewModdingAPI.csproj | 10 +++++----- 9 files changed, 13 insertions(+), 10 deletions(-) rename src/SMAPI/Framework/Serialisation/{ => Converters}/ColorConverter.cs (96%) rename src/SMAPI/Framework/Serialisation/{ => Converters}/PointConverter.cs (96%) rename src/SMAPI/Framework/Serialisation/{ => Converters}/RectangleConverter.cs (97%) rename src/SMAPI/Framework/Serialisation/{ => Converters}/SFieldConverter.cs (98%) rename src/SMAPI/Framework/Serialisation/{ => Converters}/StringEnumConverter.cs (91%) diff --git a/src/SMAPI/Framework/Models/Manifest.cs b/src/SMAPI/Framework/Models/Manifest.cs index b85787e5..c362be9b 100644 --- a/src/SMAPI/Framework/Models/Manifest.cs +++ b/src/SMAPI/Framework/Models/Manifest.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json; using StardewModdingAPI.Framework.Serialisation; +using StardewModdingAPI.Framework.Serialisation.Converters; namespace StardewModdingAPI.Framework.Models { diff --git a/src/SMAPI/Framework/Models/ModDataRecord.cs b/src/SMAPI/Framework/Models/ModDataRecord.cs index c6a12188..fa6fc68d 100644 --- a/src/SMAPI/Framework/Models/ModDataRecord.cs +++ b/src/SMAPI/Framework/Models/ModDataRecord.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using StardewModdingAPI.Framework.Serialisation; +using StardewModdingAPI.Framework.Serialisation.Converters; namespace StardewModdingAPI.Framework.Models { diff --git a/src/SMAPI/Framework/Serialisation/ColorConverter.cs b/src/SMAPI/Framework/Serialisation/Converters/ColorConverter.cs similarity index 96% rename from src/SMAPI/Framework/Serialisation/ColorConverter.cs rename to src/SMAPI/Framework/Serialisation/Converters/ColorConverter.cs index d2315a00..7f830a0e 100644 --- a/src/SMAPI/Framework/Serialisation/ColorConverter.cs +++ b/src/SMAPI/Framework/Serialisation/Converters/ColorConverter.cs @@ -3,7 +3,7 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json.Linq; using StardewModdingAPI.Framework.Exceptions; -namespace StardewModdingAPI.Framework.Serialisation +namespace StardewModdingAPI.Framework.Serialisation.Converters { /// Handles deserialisation of for crossplatform compatibility. /// diff --git a/src/SMAPI/Framework/Serialisation/PointConverter.cs b/src/SMAPI/Framework/Serialisation/Converters/PointConverter.cs similarity index 96% rename from src/SMAPI/Framework/Serialisation/PointConverter.cs rename to src/SMAPI/Framework/Serialisation/Converters/PointConverter.cs index bdcefaa5..87d0ff34 100644 --- a/src/SMAPI/Framework/Serialisation/PointConverter.cs +++ b/src/SMAPI/Framework/Serialisation/Converters/PointConverter.cs @@ -3,7 +3,7 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json.Linq; using StardewModdingAPI.Framework.Exceptions; -namespace StardewModdingAPI.Framework.Serialisation +namespace StardewModdingAPI.Framework.Serialisation.Converters { /// Handles deserialisation of for crossplatform compatibility. /// diff --git a/src/SMAPI/Framework/Serialisation/RectangleConverter.cs b/src/SMAPI/Framework/Serialisation/Converters/RectangleConverter.cs similarity index 97% rename from src/SMAPI/Framework/Serialisation/RectangleConverter.cs rename to src/SMAPI/Framework/Serialisation/Converters/RectangleConverter.cs index bbf60435..7cf912a7 100644 --- a/src/SMAPI/Framework/Serialisation/RectangleConverter.cs +++ b/src/SMAPI/Framework/Serialisation/Converters/RectangleConverter.cs @@ -4,7 +4,7 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json.Linq; using StardewModdingAPI.Framework.Exceptions; -namespace StardewModdingAPI.Framework.Serialisation +namespace StardewModdingAPI.Framework.Serialisation.Converters { /// Handles deserialisation of for crossplatform compatibility. /// diff --git a/src/SMAPI/Framework/Serialisation/SFieldConverter.cs b/src/SMAPI/Framework/Serialisation/Converters/SFieldConverter.cs similarity index 98% rename from src/SMAPI/Framework/Serialisation/SFieldConverter.cs rename to src/SMAPI/Framework/Serialisation/Converters/SFieldConverter.cs index 6e068599..69353491 100644 --- a/src/SMAPI/Framework/Serialisation/SFieldConverter.cs +++ b/src/SMAPI/Framework/Serialisation/Converters/SFieldConverter.cs @@ -5,7 +5,7 @@ using Newtonsoft.Json.Linq; using StardewModdingAPI.Framework.Exceptions; using StardewModdingAPI.Framework.Models; -namespace StardewModdingAPI.Framework.Serialisation +namespace StardewModdingAPI.Framework.Serialisation.Converters { /// Overrides how SMAPI reads and writes and fields. internal class SFieldConverter : JsonConverter diff --git a/src/SMAPI/Framework/Serialisation/StringEnumConverter.cs b/src/SMAPI/Framework/Serialisation/Converters/StringEnumConverter.cs similarity index 91% rename from src/SMAPI/Framework/Serialisation/StringEnumConverter.cs rename to src/SMAPI/Framework/Serialisation/Converters/StringEnumConverter.cs index 7afe86cd..0a612c74 100644 --- a/src/SMAPI/Framework/Serialisation/StringEnumConverter.cs +++ b/src/SMAPI/Framework/Serialisation/Converters/StringEnumConverter.cs @@ -1,7 +1,7 @@ using System; using Newtonsoft.Json.Converters; -namespace StardewModdingAPI.Framework.Serialisation +namespace StardewModdingAPI.Framework.Serialisation.Converters { /// A variant of which only converts a specified enum. /// The enum type. diff --git a/src/SMAPI/Framework/Serialisation/JsonHelper.cs b/src/SMAPI/Framework/Serialisation/JsonHelper.cs index 90a6d258..1253f242 100644 --- a/src/SMAPI/Framework/Serialisation/JsonHelper.cs +++ b/src/SMAPI/Framework/Serialisation/JsonHelper.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using Microsoft.Xna.Framework.Input; using Newtonsoft.Json; +using StardewModdingAPI.Framework.Serialisation.Converters; namespace StardewModdingAPI.Framework.Serialisation { diff --git a/src/SMAPI/StardewModdingAPI.csproj b/src/SMAPI/StardewModdingAPI.csproj index dd4f6134..f5060e2d 100644 --- a/src/SMAPI/StardewModdingAPI.csproj +++ b/src/SMAPI/StardewModdingAPI.csproj @@ -111,9 +111,9 @@ - - - + + + @@ -181,8 +181,8 @@ - - + +