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

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

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

--- trunk/libxmltv/Core/XMLTVChannelCollection.cs	2013/03/08 04:01:25	46
+++ trunk/libxmltv/Core/XMLTVChannelCollection.cs	2013/03/08 08:51:10	54
@@ -14,7 +14,11 @@
         private Dictionary<string, IXMLTVChannel> entries = new Dictionary<string, IXMLTVChannel>();
         internal static void CreateInstance(XMLTVRuntimeInstance xmltv)
         {
-            using (XMLTVChannelCollection g = new XMLTVChannelCollection(xmltv)) { g.instance.Channels = g.Collection; }
+            using (XMLTVChannelCollection g = new XMLTVChannelCollection(xmltv)) 
+            {
+                g.instance.Channels = g.Collection;
+                xmltv_logger.Log.Info.WriteLine(g.ToString());
+            }
         }
         private XMLTVRuntimeInstance instance;
         public XMLTVChannelCollection(XMLTVRuntimeInstance xmltv)
@@ -37,12 +41,13 @@
 
         private void Create()
         {
-            var doc = instance.XmlDoc;
+            var doc = XDocument.Parse(instance.XmlDoc);
 
             foreach (var c in doc.Descendants(XMLTVConstants.CHANNEL_ELEMENT))
             {
                 if (instance.IsAborting)
                 {
+                    xmltv_logger.Log.Verbose.Debug.WriteLine("Detected Instance abort event...");
                     break;
                 }
                 Channel channel = new Channel(c);
@@ -53,7 +58,7 @@
         }
         public override string ToString()
         {
-            return string.Format("Channel Count: {0}", Collection == null ? 0 : Collection.Count);
+            return string.Format("Total Channels Parsed: {0}", Collection == null ? 0 : Collection.Count);
         }
 
         public void Dispose()

 

  ViewVC Help
Powered by ViewVC 1.1.22