diff API/Factories/Xml/WarFoundryXmlFactory.cs @ 463:cbeee87dc2d3

Re #58: Remove LogNotifier from API * Remove LogNotifier from API - mostly unnecessary logging Also: * Formatting auto-corrected * LoadFile() "try...catch {silently dispose}" removed. Code shouldn't be throwing those errors and needs to be handled elsewhere if it does
author IBBoard <dev@ibboard.co.uk>
date Sat, 17 Mar 2012 20:02:32 +0000
parents 86725e88052e
children
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlFactory.cs	Tue Mar 06 20:31:31 2012 +0000
+++ b/API/Factories/Xml/WarFoundryXmlFactory.cs	Sat Mar 17 20:02:32 2012 +0000
@@ -1,7 +1,6 @@
 // This file (WarFoundryXmlFactory.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2007, 2008, 2009 IBBoard.
 //
 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
-
 using System;
 using System.IO;
 using System.Xml;
@@ -12,7 +11,6 @@
 using IBBoard;
 using IBBoard.IO;
 using IBBoard.Lang;
-using IBBoard.Logging;
 using IBBoard.Xml;
 using IBBoard.WarFoundry.API.Objects;
 using ICSharpCode.SharpZipLib.Zip;
@@ -98,7 +96,7 @@
 			return entries;
 		}
 		
-		protected override Army CreateArmyFromStream (ZipFile file, Stream dataStream)
+		protected override Army CreateArmyFromStream(ZipFile file, Stream dataStream)
 		{
 			XmlElement elem = GetRootElementFromStream(dataStream, WarFoundryXmlElementName.ARMY_ELEMENT);
 			return armyFactory.CreateArmyFromElement(file, elem);
@@ -123,10 +121,9 @@
 			return FindEntries(file, "*.systemx");
 		}
 		
-		protected override GameSystem CreateGameSystemFromStream (ZipFile file, Stream dataStream)
+		protected override GameSystem CreateGameSystemFromStream(ZipFile file, Stream dataStream)
 		{
 			XmlElement elem = GetRootElementFromStream(dataStream, WarFoundryXmlElementName.SYSTEM_ELEMENT);
-			LogNotifier.Debug(GetType(), "Create GameSystem");
 			return gameSystemFactory.CreateSystemFromElement(file, elem);
 		}
 		
@@ -135,10 +132,9 @@
 			return FindEntries(file, "*.racex");
 		}
 		
-		protected override Race CreateRaceFromStream (ZipFile file, Stream dataStream)
+		protected override Race CreateRaceFromStream(ZipFile file, Stream dataStream)
 		{
 			XmlElement elem = GetRootElementFromStream(dataStream, WarFoundryXmlElementName.RACE_ELEMENT);
-			LogNotifier.Debug(GetType(), "Create Race");
 			return raceFactory.CreateRace(elem);
 		}
 
@@ -148,16 +144,14 @@
 		}
 
 		public override void CompleteLoading(IWarFoundryStagedLoadObject obj)
-		{			
-			LogNotifier.DebugFormat(GetType(), "Complete loading of {0} with ID {1}", obj.GetType().Name, obj.ID);
-
+		{
 			if (obj is GameSystem)
 			{
-				CompleteLoadingGameSystem((GameSystem) obj);
+				CompleteLoadingGameSystem((GameSystem)obj);
 			}
 			else if (obj is Race)
 			{
-				CompleteLoadingRace((Race) obj);
+				CompleteLoadingRace((Race)obj);
 			}
 		}