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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (hide annotations) (download)
Sat Mar 9 01:46:42 2013 UTC (7 years, 7 months ago) by william
File size: 1586 byte(s)

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

  ViewVC Help
Powered by ViewVC 1.1.22