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

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

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

--- trunk/libxmltv/Core/XMLTVProgramCollection.cs	2013/03/08 03:09:49	43
+++ trunk/libxmltv/Core/XMLTVProgramCollection.cs	2013/03/08 03:36:44	44
@@ -9,11 +9,15 @@
 
 namespace libxmltv.Core
 {
-    internal class XMLTVProgramCollection
+    internal class XMLTVProgramCollection : IDisposable
     {
         private Dictionary<int, IXMLTVProgram> entries = new Dictionary<int, IXMLTVProgram>();
+        internal static void CreateInstance(XMLTVRuntimeInstance xmltv)
+        {
+            using (XMLTVProgramCollection g = new XMLTVProgramCollection(xmltv)) { g.instance.Programs = g.Collection; }
+        }
         private XMLTVRuntimeInstance instance;
-        public XMLTVProgramCollection(XMLTVRuntimeInstance xmltv)
+        protected XMLTVProgramCollection(XMLTVRuntimeInstance xmltv)
         {
             XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("Creating Instance of XMLTVProgramCollection");
             //IXMLTV_PARSER _xmltv;
@@ -100,11 +104,16 @@
                 Application.DoEvents();
                 index++;
             }
+            //instance.Programs = Collection;
         }
         public override string ToString()
         {
             return string.Format("Program Count: {0}", Collection == null ? 0 : Collection.Count);
-            return string.Empty;
+        }
+
+        public void Dispose()
+        {
+            //throw new NotImplementedException();
         }
     }
     [Serializable]

 

  ViewVC Help
Powered by ViewVC 1.1.22