changeset 115:d0c60b3204c1

Re #53: Add XML army saving * Make file identifiers public * Add army identifier to comment no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 22 Aug 2009 19:41:15 +0000
parents a143b077a825
children 2010a7e8bf9a
files api/Factories/AbstractNativeWarFoundryFactory.cs api/Factories/Xml/WarFoundryXmlSaver.cs
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/api/Factories/AbstractNativeWarFoundryFactory.cs	Sat Aug 22 18:35:03 2009 +0000
+++ b/api/Factories/AbstractNativeWarFoundryFactory.cs	Sat Aug 22 19:41:15 2009 +0000
@@ -23,9 +23,9 @@
 	/// </summary>
 	public abstract class AbstractNativeWarFoundryFactory : AbstractWarFoundryFactory<ZipFile>, INativeWarFoundryFactory
 	{
-		protected static readonly string SYSTEM_ZIP_IDENTIFIER = "WarFoundry_System";
-		protected static readonly string RACE_ZIP_IDENTIFIER = "WarFoundry_Race";
-		protected static readonly string ARMY_ZIP_IDENTIFIER = "WarFoundry_Army";
+		public static readonly string SYSTEM_ZIP_IDENTIFIER = "WarFoundry_System";
+		public static readonly string RACE_ZIP_IDENTIFIER = "WarFoundry_Race";
+		public static readonly string ARMY_ZIP_IDENTIFIER = "WarFoundry_Army";
 				
 		protected AbstractNativeWarFoundryFactory()
 		{
--- a/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 18:35:03 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 19:41:15 2009 +0000
@@ -35,6 +35,7 @@
 				file = ZipFile.Create(savePath);
 				file.BeginUpdate();
 				file.Add(new StringZipEntrySource(CreateXmlString(toSave)), "data.armyx");
+				file.SetComment(AbstractNativeWarFoundryFactory.ARMY_ZIP_IDENTIFIER);
 				file.CommitUpdate();
 				success = true;
 			}