/[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

revision 71 by william, Sat Mar 9 01:46:42 2013 UTC revision 72 by william, Sat Mar 9 09:29:40 2013 UTC
# Line 1  Line 1 
1  //#define XMLTV_PARSER_TESTING // when defined will allow calls to be made to _imp_TestParse()  ////#define XMLTV_PARSER_TESTING // when defined will allow calls to be made to _imp_TestParse()
2  using System;  //using System;
3  using System.Collections.Generic;  //using System.Collections.Generic;
4  using System.Linq;  //using System.Linq;
5  using System.Text;  //using System.Text;
6  using libxmltv.Interfaces;  //using libxmltv.Interfaces;
7  using System.Diagnostics;  //using System.Diagnostics;
8  using System.Xml.Linq;  //using System.Xml.Linq;
9    
10  namespace libxmltv.Core  //namespace libxmltv.Core
11  {  //{
12      internal class XMLTVParser : IDisposable  //    internal class XMLTVParser : XMLTVBase, IDisposable
13      {  //    {
14          private XMLTVRuntimeInstance instance;  //        //private XMLTVRuntimeInstance instance;
15    
16          internal static void CreateInstance(XMLTVRuntimeInstance xmltv)  //        //internal static void CreateInstance(XMLTVRuntimeInstance xmltv)
17          {  //        //{
18              using (XMLTVParser g = new XMLTVParser(xmltv)) { }  //        //    using (XMLTVParser g = new XMLTVParser(xmltv)) { }
19          }  //        //}
20    
21    
22          protected XMLTVParser(XMLTVRuntimeInstance xmltv)  //        protected XMLTVParser(XMLTVRuntimeInstance instance) : base(instance)
23          {  //        {
24              xmltv_logger.Debug.WriteLine("Creating Instance of XMLTVParser");  //            xmltv_logger.Debug.WriteLine("Creating Instance of XMLTVParser");
25              instance = xmltv;              
26              Create();  //            xmltv_logger.Debug.WriteLine("Created Instance of XMLTVParser");
27          }  //        }
28    
29          #region Creation Methods  //        #region Creation Methods
30          private void Create()  //        //private void Create()
31          {  //        //{
32              CreateXMLTVSource();  //        //    CreateXMLTVSource();
33              CreateXMLTVChannels();  //        //    CreateXMLTVChannels();
34              CreateXMLTVPrograms();  //        //    CreateXMLTVPrograms();
35              xmltv_logger.Info.WriteLine("Parsed Source: '{0}'", instance.Source.SourceName);  //        //    xmltv_logger.Info.WriteLine("Parsed Source: '{0}'", instance.Source.SourceName);
36          }  //        //}
37          private void CreateXMLTVSource()  //        //private void CreateXMLTVSource()
38          {  //        //{
39              XMLTVSource.CreateInstance(instance);  //        //    XMLTVSource.CreateInstance(instance);
40          }  //        //}
41          private void CreateXMLTVChannels()  //        //private void CreateXMLTVChannels()
42          {            //        //{          
43              XMLTVChannelCollection.CreateInstance(instance);  //        //    XMLTVChannelCollection.CreateInstance(instance);
44          }  //        //}
45          private void CreateXMLTVPrograms()  //        //private void CreateXMLTVPrograms()
46          {  //        //{
47              XMLTVProgramCollection.CreateInstance(instance);  //        //    XMLTVProgramCollection.CreateInstance(instance);
48          }  //        //}
49          #endregion  //        #endregion
50    
51          public void Dispose()  //        public void Dispose()
52          {  //        {
53              //throw new NotImplementedException();  //            //throw new NotImplementedException();
54          }  //        }
55      }  //    }
56  }  //}

Legend:
Removed from v.71  
changed lines
  Added in v.72

  ViewVC Help
Powered by ViewVC 1.1.22