Browse Source

RPG: Update solution file and refactored RolePlayingGameWriter.cs

CartBlanche 1 month ago
parent
commit
4968b701dd

+ 40 - 40
RolePlayingGame/RolePlayingGame.sln

@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 # Visual Studio Version 17
 VisualStudioVersion = 17.0.31903.59
 VisualStudioVersion = 17.0.31903.59
 MinimumVisualStudioVersion = 10.0.40219.1
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Core", "Core\RolePlayingGame.Core.csproj", "{32028705-62B7-4256-B1F5-439BE79DBBCA}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Windows", "Platforms\Windows\RolePlayingGame.Windows.csproj", "{FD6B2050-975F-4D78-8C7B-36F76D083FC8}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Windows", "Platforms\Windows\RolePlayingGame.Windows.csproj", "{FD6B2050-975F-4D78-8C7B-36F76D083FC8}"
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Desktop", "Platforms\Desktop\RolePlayingGame.Desktop.csproj", "{CC0C7E92-AFC2-4844-80C3-6531445337D9}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Desktop", "Platforms\Desktop\RolePlayingGame.Desktop.csproj", "{CC0C7E92-AFC2-4844-80C3-6531445337D9}"
@@ -13,9 +11,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Android", "
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.iOS", "Platforms\iOS\RolePlayingGame.iOS.csproj", "{99C5DAC0-7A12-4A74-B52E-2E28C7395751}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.iOS", "Platforms\iOS\RolePlayingGame.iOS.csproj", "{99C5DAC0-7A12-4A74-B52E-2E28C7395751}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Data", "RolePlayingGameData\RolePlayingGame.Data.csproj", "{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlaying.Core", "Core\RolePlaying.Core.csproj", "{76186E61-D2F4-7BC7-9723-42C7808294F9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlaying.Data", "RolePlayingGameData\RolePlaying.Data.csproj", "{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlayingGame.Processors", "RolePlayingGameProcessors\RolePlayingGame.Processors.csproj", "{201DEFB0-AC20-2D12-682E-1F278895F197}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RolePlaying.Processors", "RolePlayingGameProcessors\RolePlaying.Processors.csproj", "{22A7A258-C275-7B62-F5D9-98E652118B2E}"
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -27,18 +27,6 @@ Global
 		Release|x86 = Release|x86
 		Release|x86 = Release|x86
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|x64.Build.0 = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Debug|x86.Build.0 = Debug|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|Any CPU.Build.0 = Release|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|x64.ActiveCfg = Release|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|x64.Build.0 = Release|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|x86.ActiveCfg = Release|Any CPU
-		{32028705-62B7-4256-B1F5-439BE79DBBCA}.Release|x86.Build.0 = Release|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|x64.ActiveCfg = Debug|Any CPU
 		{FD6B2050-975F-4D78-8C7B-36F76D083FC8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,30 +75,42 @@ Global
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x64.Build.0 = Release|Any CPU
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x64.Build.0 = Release|Any CPU
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x86.ActiveCfg = Release|Any CPU
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x86.ActiveCfg = Release|Any CPU
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x86.Build.0 = Release|Any CPU
 		{99C5DAC0-7A12-4A74-B52E-2E28C7395751}.Release|x86.Build.0 = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|x64.Build.0 = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Debug|x86.Build.0 = Debug|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|Any CPU.Build.0 = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|x64.ActiveCfg = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|x64.Build.0 = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|x86.ActiveCfg = Release|Any CPU
-		{68408B9D-273A-5946-C7E2-2E5AB96D6FB3}.Release|x86.Build.0 = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|x64.Build.0 = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Debug|x86.Build.0 = Debug|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|Any CPU.Build.0 = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|x64.ActiveCfg = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|x64.Build.0 = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|x86.ActiveCfg = Release|Any CPU
-		{201DEFB0-AC20-2D12-682E-1F278895F197}.Release|x86.Build.0 = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|x64.Build.0 = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Debug|x86.Build.0 = Debug|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|x64.ActiveCfg = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|x64.Build.0 = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|x86.ActiveCfg = Release|Any CPU
+		{76186E61-D2F4-7BC7-9723-42C7808294F9}.Release|x86.Build.0 = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|x64.Build.0 = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Debug|x86.Build.0 = Debug|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|x64.ActiveCfg = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|x64.Build.0 = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|x86.ActiveCfg = Release|Any CPU
+		{9BF69AC1-68D6-4CBD-F63A-8A8C0BAFA58A}.Release|x86.Build.0 = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|x64.Build.0 = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Debug|x86.Build.0 = Debug|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|x64.ActiveCfg = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|x64.Build.0 = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|x86.ActiveCfg = Release|Any CPU
+		{22A7A258-C275-7B62-F5D9-98E652118B2E}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE

+ 6 - 22
RolePlayingGame/RolePlayingGameProcessors/RolePlayingGameWriter.cs

@@ -22,6 +22,8 @@ namespace RolePlaying.Processors
 {
 {
     public abstract class RolePlayingGameWriter<T> : ContentTypeWriter<T>
     public abstract class RolePlayingGameWriter<T> : ContentTypeWriter<T>
     {
     {
+        const string DATA_ASSEMBLY = "RolePlaying.Data";
+
         public override string GetRuntimeReader(TargetPlatform targetPlatform)
         public override string GetRuntimeReader(TargetPlatform targetPlatform)
         {
         {
             Type type = typeof(T);
             Type type = typeof(T);
@@ -32,24 +34,15 @@ namespace RolePlaying.Processors
             {
             {
                 // build the name of a templated type
                 // build the name of a templated type
                 shortTypeName = shortTypeName.Substring(0, shortTypeName.Length - 2);
                 shortTypeName = shortTypeName.Substring(0, shortTypeName.Length - 2);
-                readerText = readerText.Insert(readerText.IndexOf("`1") + 2, "+" + 
-                    shortTypeName + "Reader"); 
+                readerText = readerText.Insert(readerText.IndexOf("`1") + 2, "+" +
+                    shortTypeName + "Reader");
             }
             }
             else
             else
             {
             {
                 // build the name of a non-templated type
                 // build the name of a non-templated type
                 readerText += "+" + shortTypeName + "Reader";
                 readerText += "+" + shortTypeName + "Reader";
             }
             }
-            readerText += ", RolePlayingGameDataWindows";
-
-            // replace the suffix name on the Xbox 360
-            // -- since the processor runs on Windows, it needs to reference 
-            //    RolePlayingGameDataWindows.  However, this means that type.FullName
-            //    will specify RolePlayingGameWindows in the interior type of templates
-            if (targetPlatform == TargetPlatform.Xbox360)
-            {
-                readerText = readerText.Replace("Windows", "Xbox");
-            }
+            readerText += $", {DATA_ASSEMBLY}";
 
 
             System.Diagnostics.Debug.WriteLine("Reader:  " + readerText);
             System.Diagnostics.Debug.WriteLine("Reader:  " + readerText);
 
 
@@ -61,16 +54,7 @@ namespace RolePlaying.Processors
         {
         {
             Type type = typeof(T);
             Type type = typeof(T);
 
 
-            string typeText = type.FullName + ", RolePlayingGameDataWindows";
-
-            // replace the suffix name on the Xbox 360
-            // -- since the processor runs on Windows, it needs to reference 
-            //    RolePlayingGameDataWindows.  However, this means that type.FullName
-            //    will specify RolePlayingGameWindows in the interior type of templates
-            if (targetPlatform == TargetPlatform.Xbox360)
-            {
-                typeText = typeText.Replace("Windows", "Xbox");
-            }
+            string typeText = type.FullName + $", {DATA_ASSEMBLY}";
 
 
             System.Diagnostics.Debug.WriteLine("Type:  " + typeText);
             System.Diagnostics.Debug.WriteLine("Type:  " + typeText);