From 2ba458f02b43dae3d9b0ae70860e4da53dec8bfb Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Wed, 18 May 2022 22:12:43 -0500 Subject: [PATCH] Refactored namespace and project name. --- .vscode/launch.json | 4 ++-- .vscode/settings.json | 2 +- .vscode/tasks.json | 6 +++--- MCCFMD/MCCFMD.csproj => CFUtils/CFUtils.csproj | 0 {MCCFMD => CFUtils}/Commands/Install.cs | 4 ++-- {MCCFMD => CFUtils}/Program.cs | 4 ++-- {MCCFMD => CFUtils}/Serialization/ManifestConverter.cs | 6 +++--- CFUtils/Serialization/ManifestGames.cs | 7 +++++++ {MCCFMD => CFUtils}/Serialization/Modpack/File.cs | 2 +- {MCCFMD => CFUtils}/Serialization/Modpack/Game.cs | 2 +- {MCCFMD => CFUtils}/Serialization/Modpack/Manifest.cs | 2 +- {MCCFMD => CFUtils}/Serialization/Modpack/ModLoader.cs | 2 +- {MCCFMD => CFUtils}/Serialization/ProfileReader.cs | 2 +- MCCFMD/Serialization/ManifestGames.cs | 4 ---- 14 files changed, 25 insertions(+), 22 deletions(-) rename MCCFMD/MCCFMD.csproj => CFUtils/CFUtils.csproj (100%) rename {MCCFMD => CFUtils}/Commands/Install.cs (97%) rename {MCCFMD => CFUtils}/Program.cs (91%) rename {MCCFMD => CFUtils}/Serialization/ManifestConverter.cs (95%) create mode 100644 CFUtils/Serialization/ManifestGames.cs rename {MCCFMD => CFUtils}/Serialization/Modpack/File.cs (80%) rename {MCCFMD => CFUtils}/Serialization/Modpack/Game.cs (87%) rename {MCCFMD => CFUtils}/Serialization/Modpack/Manifest.cs (92%) rename {MCCFMD => CFUtils}/Serialization/Modpack/ModLoader.cs (75%) rename {MCCFMD => CFUtils}/Serialization/ProfileReader.cs (60%) delete mode 100644 MCCFMD/Serialization/ManifestGames.cs diff --git a/.vscode/launch.json b/.vscode/launch.json index 05438c7..a68f940 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,9 +10,9 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/MCCFMD/bin/Debug/net6.0/MCCFMD.dll", + "program": "${workspaceFolder}/CFUtils/bin/Debug/net6.0/CFUtils.dll", "args": [], - "cwd": "${workspaceFolder}/MCCFMD", + "cwd": "${workspaceFolder}/CFUtils", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console "console": "internalConsole", "stopAtEntry": false diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f7a336..e6f1cf0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "cSpell.words": [ - "MCCFMD" + "CFUtils" ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c68aa27..c81845a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/MCCFMD/MCCFMD.csproj", + "${workspaceFolder}/CFUtils/CFUtils.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -19,7 +19,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/MCCFMD/MCCFMD.csproj", + "${workspaceFolder}/CFUtils/CFUtils.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -33,7 +33,7 @@ "watch", "run", "--project", - "${workspaceFolder}/MCCFMD/MCCFMD.csproj" + "${workspaceFolder}/CFUtils/CFUtils.csproj" ], "problemMatcher": "$msCompile" } diff --git a/MCCFMD/MCCFMD.csproj b/CFUtils/CFUtils.csproj similarity index 100% rename from MCCFMD/MCCFMD.csproj rename to CFUtils/CFUtils.csproj diff --git a/MCCFMD/Commands/Install.cs b/CFUtils/Commands/Install.cs similarity index 97% rename from MCCFMD/Commands/Install.cs rename to CFUtils/Commands/Install.cs index 6cf65ce..470b94d 100644 --- a/MCCFMD/Commands/Install.cs +++ b/CFUtils/Commands/Install.cs @@ -4,9 +4,9 @@ using System.IO; using System.CommandLine; using System.Threading.Tasks; -namespace MCCFMD.Commands +namespace CFUtils.Commands { - public class Install : Command + internal class Install : Command { const string NAME = "install"; const string DESC = "Install the profile described by the manifest."; diff --git a/MCCFMD/Program.cs b/CFUtils/Program.cs similarity index 91% rename from MCCFMD/Program.cs rename to CFUtils/Program.cs index 48a3824..a5834db 100644 --- a/MCCFMD/Program.cs +++ b/CFUtils/Program.cs @@ -2,9 +2,9 @@ using System; using System.CommandLine; using System.Threading.Tasks; -using MCCFMD.Commands; +using CFUtils.Commands; -namespace MCCFMD +namespace CFUtils { internal class Program { diff --git a/MCCFMD/Serialization/ManifestConverter.cs b/CFUtils/Serialization/ManifestConverter.cs similarity index 95% rename from MCCFMD/Serialization/ManifestConverter.cs rename to CFUtils/Serialization/ManifestConverter.cs index bbc4f09..2d990ac 100644 --- a/MCCFMD/Serialization/ManifestConverter.cs +++ b/CFUtils/Serialization/ManifestConverter.cs @@ -4,11 +4,11 @@ using System.Linq; using System; using System.Text.Json; using System.Text.Json.Serialization; -using MCCFMD.Serialization.Modpack; +using CFUtils.Serialization.Modpack; -namespace MCCFMD.Serialization +namespace CFUtils.Serialization { - public class ManifestConverter : JsonConverter + internal class ManifestConverter : JsonConverter { PropertyInfo[] manifestProperties; Type manifestType; diff --git a/CFUtils/Serialization/ManifestGames.cs b/CFUtils/Serialization/ManifestGames.cs new file mode 100644 index 0000000..95c58da --- /dev/null +++ b/CFUtils/Serialization/ManifestGames.cs @@ -0,0 +1,7 @@ +namespace CFUtils.Serialization +{ + public enum ManifestGames + { + Minecraft + } +} diff --git a/MCCFMD/Serialization/Modpack/File.cs b/CFUtils/Serialization/Modpack/File.cs similarity index 80% rename from MCCFMD/Serialization/Modpack/File.cs rename to CFUtils/Serialization/Modpack/File.cs index 745a51c..e70a877 100644 --- a/MCCFMD/Serialization/Modpack/File.cs +++ b/CFUtils/Serialization/Modpack/File.cs @@ -1,4 +1,4 @@ -namespace MCCFMD.Serialization.Modpack +namespace CFUtils.Serialization.Modpack { public struct File { diff --git a/MCCFMD/Serialization/Modpack/Game.cs b/CFUtils/Serialization/Modpack/Game.cs similarity index 87% rename from MCCFMD/Serialization/Modpack/Game.cs rename to CFUtils/Serialization/Modpack/Game.cs index ef1e7fd..588c20f 100644 --- a/MCCFMD/Serialization/Modpack/Game.cs +++ b/CFUtils/Serialization/Modpack/Game.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MCCFMD.Serialization.Modpack +namespace CFUtils.Serialization.Modpack { public struct Game { diff --git a/MCCFMD/Serialization/Modpack/Manifest.cs b/CFUtils/Serialization/Modpack/Manifest.cs similarity index 92% rename from MCCFMD/Serialization/Modpack/Manifest.cs rename to CFUtils/Serialization/Modpack/Manifest.cs index 2fa6863..d342658 100644 --- a/MCCFMD/Serialization/Modpack/Manifest.cs +++ b/CFUtils/Serialization/Modpack/Manifest.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -namespace MCCFMD.Serialization.Modpack +namespace CFUtils.Serialization.Modpack { public struct Manifest { diff --git a/MCCFMD/Serialization/Modpack/ModLoader.cs b/CFUtils/Serialization/Modpack/ModLoader.cs similarity index 75% rename from MCCFMD/Serialization/Modpack/ModLoader.cs rename to CFUtils/Serialization/Modpack/ModLoader.cs index 379648d..dcb4c1a 100644 --- a/MCCFMD/Serialization/Modpack/ModLoader.cs +++ b/CFUtils/Serialization/Modpack/ModLoader.cs @@ -1,4 +1,4 @@ -namespace MCCFMD.Serialization.Modpack +namespace CFUtils.Serialization.Modpack { public struct ModLoader { diff --git a/MCCFMD/Serialization/ProfileReader.cs b/CFUtils/Serialization/ProfileReader.cs similarity index 60% rename from MCCFMD/Serialization/ProfileReader.cs rename to CFUtils/Serialization/ProfileReader.cs index e684fbe..0212008 100644 --- a/MCCFMD/Serialization/ProfileReader.cs +++ b/CFUtils/Serialization/ProfileReader.cs @@ -1,4 +1,4 @@ -namespace MCCFMD.Serialization +namespace CFUtils.Serialization { internal class ProfileReader { diff --git a/MCCFMD/Serialization/ManifestGames.cs b/MCCFMD/Serialization/ManifestGames.cs deleted file mode 100644 index a80540f..0000000 --- a/MCCFMD/Serialization/ManifestGames.cs +++ /dev/null @@ -1,4 +0,0 @@ -public enum ManifestGames -{ - Minecraft -} \ No newline at end of file