From bb165f2079e33d02c0e673db73ac5b336272a3fa Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 11 May 2017 23:21:02 -0400 Subject: [PATCH] organise a few framework classes --- .../{ => ModLoading}/AssemblyDefinitionResolver.cs | 2 +- .../Framework/{ => ModLoading}/AssemblyLoader.cs | 2 +- .../Framework/{ => ModLoading}/AssemblyParseResult.cs | 2 +- .../Framework/{ => ModLoading}/ModMetadata.cs | 2 +- .../Framework/{ => Models}/Manifest.cs | 3 +-- src/StardewModdingAPI/Mod.cs | 1 + src/StardewModdingAPI/Program.cs | 1 + src/StardewModdingAPI/StardewModdingAPI.csproj | 10 +++++----- 8 files changed, 12 insertions(+), 11 deletions(-) rename src/StardewModdingAPI/Framework/{ => ModLoading}/AssemblyDefinitionResolver.cs (98%) rename src/StardewModdingAPI/Framework/{ => ModLoading}/AssemblyLoader.cs (99%) rename src/StardewModdingAPI/Framework/{ => ModLoading}/AssemblyParseResult.cs (94%) rename src/StardewModdingAPI/Framework/{ => ModLoading}/ModMetadata.cs (96%) rename src/StardewModdingAPI/Framework/{ => Models}/Manifest.cs (96%) diff --git a/src/StardewModdingAPI/Framework/AssemblyDefinitionResolver.cs b/src/StardewModdingAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs similarity index 98% rename from src/StardewModdingAPI/Framework/AssemblyDefinitionResolver.cs rename to src/StardewModdingAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs index b4e69fcd..4378798c 100644 --- a/src/StardewModdingAPI/Framework/AssemblyDefinitionResolver.cs +++ b/src/StardewModdingAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Mono.Cecil; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModLoading { /// A minimal assembly definition resolver which resolves references to known assemblies. internal class AssemblyDefinitionResolver : DefaultAssemblyResolver diff --git a/src/StardewModdingAPI/Framework/AssemblyLoader.cs b/src/StardewModdingAPI/Framework/ModLoading/AssemblyLoader.cs similarity index 99% rename from src/StardewModdingAPI/Framework/AssemblyLoader.cs rename to src/StardewModdingAPI/Framework/ModLoading/AssemblyLoader.cs index 2c9973c1..42bd7bfb 100644 --- a/src/StardewModdingAPI/Framework/AssemblyLoader.cs +++ b/src/StardewModdingAPI/Framework/ModLoading/AssemblyLoader.cs @@ -7,7 +7,7 @@ using Mono.Cecil; using Mono.Cecil.Cil; using StardewModdingAPI.AssemblyRewriters; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModLoading { /// Preprocesses and loads mod assemblies. internal class AssemblyLoader diff --git a/src/StardewModdingAPI/Framework/AssemblyParseResult.cs b/src/StardewModdingAPI/Framework/ModLoading/AssemblyParseResult.cs similarity index 94% rename from src/StardewModdingAPI/Framework/AssemblyParseResult.cs rename to src/StardewModdingAPI/Framework/ModLoading/AssemblyParseResult.cs index bff976aa..69c99afe 100644 --- a/src/StardewModdingAPI/Framework/AssemblyParseResult.cs +++ b/src/StardewModdingAPI/Framework/ModLoading/AssemblyParseResult.cs @@ -1,7 +1,7 @@ using System.IO; using Mono.Cecil; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModLoading { /// Metadata about a parsed assembly definition. internal class AssemblyParseResult diff --git a/src/StardewModdingAPI/Framework/ModMetadata.cs b/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs similarity index 96% rename from src/StardewModdingAPI/Framework/ModMetadata.cs rename to src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs index aeb9261a..1ac167dc 100644 --- a/src/StardewModdingAPI/Framework/ModMetadata.cs +++ b/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs @@ -1,6 +1,6 @@ using StardewModdingAPI.Framework.Models; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModLoading { /// Metadata for a mod. internal class ModMetadata diff --git a/src/StardewModdingAPI/Framework/Manifest.cs b/src/StardewModdingAPI/Framework/Models/Manifest.cs similarity index 96% rename from src/StardewModdingAPI/Framework/Manifest.cs rename to src/StardewModdingAPI/Framework/Models/Manifest.cs index 62c711e2..79be2075 100644 --- a/src/StardewModdingAPI/Framework/Manifest.cs +++ b/src/StardewModdingAPI/Framework/Models/Manifest.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using StardewModdingAPI.Framework.Serialisation; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.Models { /// A manifest which describes a mod for SMAPI. internal class Manifest : IManifest diff --git a/src/StardewModdingAPI/Mod.cs b/src/StardewModdingAPI/Mod.cs index a3169fb3..a65b135c 100644 --- a/src/StardewModdingAPI/Mod.cs +++ b/src/StardewModdingAPI/Mod.cs @@ -1,6 +1,7 @@ using System; using System.IO; using StardewModdingAPI.Framework; +using StardewModdingAPI.Framework.Models; namespace StardewModdingAPI { diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index a5bd7788..b8d70ad7 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -15,6 +15,7 @@ using StardewModdingAPI.Events; using StardewModdingAPI.Framework; using StardewModdingAPI.Framework.Logging; using StardewModdingAPI.Framework.Models; +using StardewModdingAPI.Framework.ModLoading; using StardewModdingAPI.Framework.Reflection; using StardewModdingAPI.Framework.Serialisation; using StardewValley; diff --git a/src/StardewModdingAPI/StardewModdingAPI.csproj b/src/StardewModdingAPI/StardewModdingAPI.csproj index 69c167c9..aec32560 100644 --- a/src/StardewModdingAPI/StardewModdingAPI.csproj +++ b/src/StardewModdingAPI/StardewModdingAPI.csproj @@ -144,8 +144,8 @@ - - + + @@ -158,7 +158,7 @@ - + @@ -182,7 +182,7 @@ - + @@ -202,7 +202,7 @@ - +