/[xmltv_parser]/branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.cs
ViewVC logotype

Diff of /branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.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 78 by william, Sat Mar 9 11:36:24 2013 UTC
# Line 5  using System.Text; Line 5  using System.Text;
5  using libxmltv.Interfaces;  using libxmltv.Interfaces;
6  using System.Xml.Linq;  using System.Xml.Linq;
7  using System.Reflection;  using System.Reflection;
8    using System.IO;
9    using System.Diagnostics;
10    
11  namespace libxmltv.Core  namespace libxmltv.Core
12  {  {
# Line 24  namespace libxmltv.Core Line 26  namespace libxmltv.Core
26          public XMLTVProgram(XMLTVRuntimeInstance instance, XElement node)          public XMLTVProgram(XMLTVRuntimeInstance instance, XElement node)
27              : base(instance, XMLTVConstants.PROGRAM_ELEMENT)              : base(instance, XMLTVConstants.PROGRAM_ELEMENT)
28          {          {
29                try {
30              xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVProgram");              xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVProgram");
31              Create(node);              Create(node);
32              xmltv_logger.Verbose.Debug.WriteLine("Created Instance of XMLTVProgram");              xmltv_logger.Verbose.Debug.WriteLine("Created Instance of XMLTVProgram");
33              UpdateInstance();              UpdateInstance();
34                }
35                catch (IOException ex) { Debug.WriteLine(ex.ToString()); }
36          }          }
37          #region IXMLTVProgram members          #region IXMLTVProgram members
38          public int Id { get; set; }          public int Id { get; set; }
# Line 55  namespace libxmltv.Core Line 60  namespace libxmltv.Core
60                      found_field = true;                      found_field = true;
61                      try                      try
62                      {                      {
63                          xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());                          
64                          var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());                          var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());
65                          this.Id = list.Count + 1;                          this.Id = list.Count + 1;
66                          list.Add(this);                          list.Add(this);
67                            xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());
68                          field.SetValue(this.GetInstance(), list);                          field.SetValue(this.GetInstance(), list);
69                          break;                          break;
70                      }                      }

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

  ViewVC Help
Powered by ViewVC 1.1.22