# HG changeset patch # User IBBoard # Date 1257452520 0 # Node ID 3e287b6b5244fcdf4021762864d286e5b29e8c1a # Parent 70ba3bee0c2e0f661e0017d9a872be1e64df50de * Line ending fixes no-open-ticket diff -r 70ba3bee0c2e -r 3e287b6b5244 api/Factories/AbstractNativeWarFoundryFactory.cs --- a/api/Factories/AbstractNativeWarFoundryFactory.cs Mon Nov 02 20:58:01 2009 +0000 +++ b/api/Factories/AbstractNativeWarFoundryFactory.cs Thu Nov 05 20:22:00 2009 +0000 @@ -82,26 +82,26 @@ { ICollection objects = null; string comment = file.ZipFileComment; - IWarFoundryObject obj = null; - - try - { - if (comment.StartsWith(SYSTEM_ZIP_IDENTIFIER)) - { - obj = CreateGameSystemFromFile(file); - } - else if (comment.StartsWith(RACE_ZIP_IDENTIFIER)) - { - obj = CreateRaceFromFile(file); - } - else if (comment.StartsWith(ARMY_ZIP_IDENTIFIER)) - { - obj = CreateArmyFromFile(file); - } - } - finally - { - file.Close(); + IWarFoundryObject obj = null; + + try + { + if (comment.StartsWith(SYSTEM_ZIP_IDENTIFIER)) + { + obj = CreateGameSystemFromFile(file); + } + else if (comment.StartsWith(RACE_ZIP_IDENTIFIER)) + { + obj = CreateRaceFromFile(file); + } + else if (comment.StartsWith(ARMY_ZIP_IDENTIFIER)) + { + obj = CreateArmyFromFile(file); + } + } + finally + { + file.Close(); } if (obj!=null) diff -r 70ba3bee0c2e -r 3e287b6b5244 api/Factories/AbstractWarFoundryFactory.cs --- a/api/Factories/AbstractWarFoundryFactory.cs Mon Nov 02 20:58:01 2009 +0000 +++ b/api/Factories/AbstractWarFoundryFactory.cs Thu Nov 05 20:22:00 2009 +0000 @@ -19,59 +19,59 @@ public bool CanHandleFileFormat (FileInfo file) { - FILE_TYPE typedFile = GetFileAsSupportedType(file); - bool canHandle = typedFile != null && CheckCanHandleFileFormat(typedFile); - - if (typedFile != null) - { - CleanUpFileAsSupportedType(typedFile); - } - + FILE_TYPE typedFile = GetFileAsSupportedType(file); + bool canHandle = typedFile != null && CheckCanHandleFileFormat(typedFile); + + if (typedFile != null) + { + CleanUpFileAsSupportedType(typedFile); + } + return canHandle; } public bool CanHandleFileAsRace(FileInfo file) { - FILE_TYPE typedFile = GetFileAsSupportedType(file); - bool canHandle = typedFile != null && CheckCanHandleFileAsRace(typedFile); - - if (typedFile != null) - { - CleanUpFileAsSupportedType(typedFile); - } - + FILE_TYPE typedFile = GetFileAsSupportedType(file); + bool canHandle = typedFile != null && CheckCanHandleFileAsRace(typedFile); + + if (typedFile != null) + { + CleanUpFileAsSupportedType(typedFile); + } + return canHandle; } public bool CanHandleFileAsGameSystem(FileInfo file) { - FILE_TYPE typedFile = GetFileAsSupportedType(file); - bool canHandle = typedFile != null && CheckCanHandleFileAsGameSystem(typedFile); - - if (typedFile != null) - { - CleanUpFileAsSupportedType(typedFile); - } - + FILE_TYPE typedFile = GetFileAsSupportedType(file); + bool canHandle = typedFile != null && CheckCanHandleFileAsGameSystem(typedFile); + + if (typedFile != null) + { + CleanUpFileAsSupportedType(typedFile); + } + return canHandle; } public bool CanHandleFileAsArmy(FileInfo file) { FILE_TYPE typedFile = GetFileAsSupportedType(file); - bool canHandle = typedFile != null && CheckCanHandleFileAsArmy(typedFile); - - if (typedFile != null) - { - CleanUpFileAsSupportedType(typedFile); - } - + bool canHandle = typedFile != null && CheckCanHandleFileAsArmy(typedFile); + + if (typedFile != null) + { + CleanUpFileAsSupportedType(typedFile); + } + return canHandle; - } - - protected virtual void CleanUpFileAsSupportedType(FILE_TYPE typedFile) - { - //Do nothing by default + } + + protected virtual void CleanUpFileAsSupportedType(FILE_TYPE typedFile) + { + //Do nothing by default } ///