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

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

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

revision 76 by william, Sat Mar 9 11:23:09 2013 UTC revision 79 by william, Sat Mar 9 11:40:15 2013 UTC
# Line 48  namespace libxmltv.Core Line 48  namespace libxmltv.Core
48    
49          private void init()          private void init()
50          {          {
51              this.Source = new List<IXMLTVSource>();              this.Source = new XMLTVSource();
52              this.Channels = new List<IXMLTVChannel>();              this.Channels = new List<IXMLTVChannel>();
53              this.Programs = new List<IXMLTVProgram>();              this.Programs = new List<IXMLTVProgram>();
54              this.XmlFile_Name = string.Empty;              this.XmlFile_Name = string.Empty;
# Line 69  namespace libxmltv.Core Line 69  namespace libxmltv.Core
69    
70          private string _XmlDoc;          private string _XmlDoc;
71          public string XmlDoc { get { return _XmlDoc; } set { _XmlDoc = value; } }          public string XmlDoc { get { return _XmlDoc; } set { _XmlDoc = value; } }
72          private List<IXMLTVSource> _Source;          private IXMLTVSource _Source;
73          public List<IXMLTVSource> Source { get { return _Source; } set { _Source = value; } }          public IXMLTVSource Source { get { return _Source; } set { _Source = value; } }
74          private List<IXMLTVChannel> _Channels;          private List<IXMLTVChannel> _Channels;
75          public List<IXMLTVChannel> Channels { get { return _Channels; } set { _Channels = value; } }          public List<IXMLTVChannel> Channels { get { return _Channels; } set { _Channels = value; } }
76          private List<IXMLTVProgram> _Programs;          private List<IXMLTVProgram> _Programs;
# Line 123  namespace libxmltv.Core Line 123  namespace libxmltv.Core
123              xmltv_logger.Debug.WriteLine("Loaded from instance...");              xmltv_logger.Debug.WriteLine("Loaded from instance...");
124              if (this.Source != null)              if (this.Source != null)
125              {              {
126                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Created by '{1}' - original source file: '{2}'", this.Source.FirstOrDefault().SourceName, this.Source.FirstOrDefault().GeneratorName, this.XmlFile_FullName);                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Created by '{1}' - original source file: '{2}'", this.Source.SourceName, this.Source.GeneratorName, this.XmlFile_FullName);
127              }              }
128              else              else
129              {              {
# Line 132  namespace libxmltv.Core Line 132  namespace libxmltv.Core
132              }              }
133              if (this.Channels != null)              if (this.Channels != null)
134              {              {
135                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Channels from source '{1}'", this.Channels.Count, this.Source.FirstOrDefault().SourceName);                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Channels from source '{1}'", this.Channels.Count, this.Source.SourceName);
136              }              }
137              else              else
138              {              {
# Line 141  namespace libxmltv.Core Line 141  namespace libxmltv.Core
141              }              }
142              if (this.Programs != null)              if (this.Programs != null)
143              {              {
144                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Programs from source '{1}'", this.Programs.Count, this.Source.FirstOrDefault().SourceName);                  xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Programs from source '{1}'", this.Programs.Count, this.Source.SourceName);
145              }              }
146              else              else
147              {              {
# Line 232  namespace libxmltv.Core Line 232  namespace libxmltv.Core
232                  CreateLoader(xmlfile);                  CreateLoader(xmlfile);
233                  CreateParser();                  CreateParser();
234              }              }
235                catch (ThreadAbortException ex) { Debug.WriteLine(ex.ToString()); }
236              catch (Exception ex)              catch (Exception ex)
237              {              {
238                  xmltv_logger.Error.WriteLine(ex.ToString());                  xmltv_logger.Error.WriteLine(ex.ToString());
# Line 284  namespace libxmltv.Core Line 285  namespace libxmltv.Core
285              double progress = 0;              double progress = 0;
286              foreach(var node in nodes)              foreach(var node in nodes)
287              {              {
288                    if (this.GetInstance().IsAborting)
289                    {
290                        break;
291                    }
292                  if (!CreateHandlerForNode(node)) { xmltv_logger.Verbose.Debug.WriteLine("Unable to create handler for node: '{0}'", node.Name.ToString()); }                  if (!CreateHandlerForNode(node)) { xmltv_logger.Verbose.Debug.WriteLine("Unable to create handler for node: '{0}'", node.Name.ToString()); }
293                  node_index++;                  node_index++;
294                  progress = 100.0 * (node_index / total_nodes);                  progress = 100.0 * (node_index / total_nodes);

Legend:
Removed from v.76  
changed lines
  Added in v.79

  ViewVC Help
Powered by ViewVC 1.1.22