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

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

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

--- trunk/libxmltv/Core/XMLTVParser.cs	2013/03/08 03:09:49	43
+++ trunk/libxmltv/Core/XMLTVParser.cs	2013/03/08 03:36:44	44
@@ -9,10 +9,17 @@
 
 namespace libxmltv.Core
 {
-    internal class XMLTVParser //: IXMLTV_PARSER
+    internal class XMLTVParser : IDisposable
     {
         private XMLTVRuntimeInstance instance;
-        public XMLTVParser(XMLTVRuntimeInstance xmltv)
+
+        internal static void CreateInstance(XMLTVRuntimeInstance xmltv)
+        {
+            using (XMLTVParser g = new XMLTVParser(xmltv)) { }
+        }
+
+
+        protected XMLTVParser(XMLTVRuntimeInstance xmltv)
         {
             XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("Creating Instance of XMLTVParser");
             //IXMLTV_LOADER _xmltv;
@@ -118,19 +125,27 @@
         }
         private void CreateXMLTVSource()
         {
-            XMLTVSource source = new XMLTVSource(instance);
-            instance.Source = source;
+            //XMLTVSource source = new XMLTVSource(instance);
+            //instance.Source = source;
+            XMLTVSource.CreateInstance(instance);
         }
         private void CreateXMLTVChannels()
         {
-            XMLTVChannelCollection channels = new XMLTVChannelCollection(instance);
-            instance.Channels = channels.Collection;            
+            //XMLTVChannelCollection channels = new XMLTVChannelCollection(instance);
+            //instance.Channels = channels.Collection;            
+            XMLTVChannelCollection.CreateInstance(instance);
         }
         private void CreateXMLTVPrograms()
         {
-            XMLTVProgramCollection programs = new XMLTVProgramCollection(instance);
-            instance.Programs = programs.Collection;
+            //XMLTVProgramCollection programs = new XMLTVProgramCollection(instance);
+            //instance.Programs = programs.Collection;
+            XMLTVProgramCollection.CreateInstance(instance);
         }
         #endregion
+
+        public void Dispose()
+        {
+            //throw new NotImplementedException();
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22