/[xmltv_parser]/trunk/libxmltv/Core/XMLTVSerializer.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/XMLTVSerializer.cs

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

--- trunk/libxmltv/Core/XMLTVSerializer.cs	2013/03/08 12:07:00	57
+++ trunk/libxmltv/Core/XMLTVSerializer.cs	2013/03/08 12:20:50	58
@@ -18,6 +18,7 @@
         public bool Serialize(string file)
         {
             bool retVal = false;
+            xmltv_logger.Debug.WriteLine("Serializing data to file: '{0}'", file);
             using (Stream stream = File.Open(file, FileMode.Create)) { retVal = Serialize(stream); }
             return retVal;
         }
@@ -25,8 +26,10 @@
         {
             try
             {
+                xmltv_logger.Debug.WriteLine("Serializing data to stream");
                 BinaryFormatter bin = new BinaryFormatter();
                 bin.Serialize(stream, data);
+                xmltv_logger.Debug.WriteLine("Serialized data to stream");
             }
             catch (Exception ex) { xmltv_logger.Error.WriteLine(ex.ToString()); return false; }
             return true;
@@ -34,6 +37,7 @@
         public T DeSerialize(string file, out bool status)
         {
            T  unpacked_data = default(T);
+           xmltv_logger.Debug.WriteLine("DeSerializing data from file: '{0}'", file);
             using (Stream stream = File.Open(file, FileMode.Open)) { unpacked_data = DeSerialize(stream, out status); }
             return unpacked_data;
         }
@@ -42,8 +46,10 @@
            T unpacked_data = default(T);
             try
             {
+                xmltv_logger.Debug.WriteLine("DeSerializing data from stream");
                 BinaryFormatter bin = new BinaryFormatter();
                 unpacked_data = (T)bin.Deserialize(stream);
+                xmltv_logger.Debug.WriteLine("DeSerialized data from stream");
             }
             catch (Exception ex) { xmltv_logger.Error.WriteLine(ex.ToString()); status = false; }
             status = true;

 

  ViewVC Help
Powered by ViewVC 1.1.22