/[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 03:09:49	43
+++ trunk/libxmltv/Core/XMLTVChannelCollection.cs	2013/03/08 03:36:44	44
@@ -9,9 +9,13 @@
 
 namespace libxmltv.Core
 {
-    internal class XMLTVChannelCollection
+    internal class XMLTVChannelCollection : IDisposable
     {
         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; }
+        }
         private XMLTVRuntimeInstance instance;
         public XMLTVChannelCollection(XMLTVRuntimeInstance xmltv)
         {
@@ -41,11 +45,17 @@
                 entries.Add(channel.Id, channel);
                 Application.DoEvents();
             }
+            //instance.Channels = Collection;
         }
         public override string ToString()
         {
             return string.Format("Channel Count: {0}", Collection == null ? 0 : Collection.Count);
         }
+
+        public void Dispose()
+        {
+            //throw new NotImplementedException();
+        }
     }
     [Serializable]
     internal class Channel : IXMLTVChannel

 

  ViewVC Help
Powered by ViewVC 1.1.22