/[RomCheater]/trunk/RomCheater/Serialization/SerializationWriter.cs
ViewVC logotype

Diff of /trunk/RomCheater/Serialization/SerializationWriter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Serialization/SerializationWriter.cs	2013/06/03 07:13:44	471
+++ trunk/RomCheater/Serialization/SerializationWriter.cs	2013/06/03 07:39:39	472
@@ -13,32 +13,36 @@
    
     public abstract class SerializationWriter : ISerializationResultCount, IDisposable
     {
-        private void CreateFilename(Guid guid)
+        private string CreateDynamicFilename(Guid guid)
         {
             if (guid == Guid.Empty)
             {
                 if (this.TemporaryFolder != string.Empty)
                 {
-                    FileName= string.Format(@"{0}\{1}\{2}", DEFAULT_FOLDER, TemporaryFolder, DEFAULT_FILENAME);
+                    return string.Format(@"{0}\{1}\{2}", DEFAULT_FOLDER, TemporaryFolder, DEFAULT_FILENAME);
                 }
                 else
                 {
-                    FileName = string.Format(@"{0}\{1}", DEFAULT_FOLDER, DEFAULT_FILENAME);
+                    return string.Format(@"{0}\{1}", DEFAULT_FOLDER, DEFAULT_FILENAME);
                 }
-                
+
             }
             else
             {
                 if (this.TemporaryFolder != string.Empty)
                 {
-                    FileName = string.Format(@"{0}\{1}\{2}", DEFAULT_FOLDER, TemporaryFolder, string.Format("{0}.tmp", guid.ToString()));
+                    return string.Format(@"{0}\{1}\{2}", DEFAULT_FOLDER, TemporaryFolder, string.Format("{0}.tmp", guid.ToString()));
                 }
                 else
                 {
-                    FileName = string.Format(@"{0}\{1}", DEFAULT_FOLDER, string.Format("{0}.tmp", guid.ToString()));
+                    return string.Format(@"{0}\{1}", DEFAULT_FOLDER, string.Format("{0}.tmp", guid.ToString()));
                 }
             }
         }
+        private void CreateFilename(Guid guid)
+        {
+            FileName = CreateDynamicFilename(guid);
+        }
         protected const string DEFAULT_FOLDER = "tmp";
         private const string DEFAULT_FILENAME = "SerializedMemoryResults.tmp";
         //private static string DEFAULT_PATH = string.Format(@"{0}\{1}", DEFAULT_FOLDER,DEFAULT_FILENAME);

 

  ViewVC Help
Powered by ViewVC 1.1.22