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

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

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

revision 78 by william, Sat Mar 9 11:36:24 2013 UTC revision 83 by william, Sat Mar 9 12:41:07 2013 UTC
# Line 13  namespace libxmltv.Core Line 13  namespace libxmltv.Core
13      [Serializable]      [Serializable]
14      internal class XMLTVChannel : XMLTVBase<XMLTVRuntimeInstance>, IXMLTVChannel      internal class XMLTVChannel : XMLTVBase<XMLTVRuntimeInstance>, IXMLTVChannel
15      {      {
16          public XMLTVChannel() : base(null,XMLTVConstants.CHANNEL_ELEMENT)          public XMLTVChannel()
17                : base(null, XMLTVConstants.CHANNEL_ELEMENT)
18          {          {
19              Id = string.Empty;              Id = string.Empty;
20              Number = 0;              Number = 0;
# Line 54  namespace libxmltv.Core Line 55  namespace libxmltv.Core
55                  {                  {
56                      found_field = true;                      found_field = true;
57                      try                      try
58                      {                                                                      {
59                          var list = (List<IXMLTVChannel>)field.GetValue(this.GetInstance());                          var list = (List<IXMLTVChannel>)field.GetValue(this.GetInstance());
60                          list.Add(this);                          list.Add(this);
61                          xmltv_logger.Verbose.Debug.WriteLine("Updating instance with channel information: {0}", this.ToString());                          xmltv_logger.Verbose.Debug.WriteLine("Updating instance with channel information: {0}", this.ToString());
# Line 75  namespace libxmltv.Core Line 76  namespace libxmltv.Core
76          }          }
77    
78          private void Create(XElement node)          private void Create(XElement node)
79          {                    {
80                  // get the channel id              // get the channel id
81                  Id = node.Attribute(XMLTVConstants.Channels.ChannelId).Value;              Id = node.Attribute(XMLTVConstants.Channels.ChannelId).Value;
82                  xmltv_logger.Verbose.Debug.WriteLine("\tchannel_id: {0}", Id);              xmltv_logger.Verbose.Debug.WriteLine("\tchannel_id: {0}", Id);
83                  var names = node.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();              var names = node.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();
84                  Number = Convert.ToInt32(names[1].Value);              Number = Convert.ToInt32(names[1].Value);
85                  xmltv_logger.Verbose.Debug.WriteLine("\tchannel_number: {0}", Number);              xmltv_logger.Verbose.Debug.WriteLine("\tchannel_number: {0}", Number);
86                  CallSign = names[2].Value;              CallSign = names[2].Value;
87                  xmltv_logger.Verbose.Debug.WriteLine("\tchannel_callsign: {0}", CallSign);              xmltv_logger.Verbose.Debug.WriteLine("\tchannel_callsign: {0}", CallSign);
88                  Name = names[3].Value;              Name = names[3].Value;
89                  xmltv_logger.Verbose.Debug.WriteLine("\tchannel_name: {0}", Name);                        xmltv_logger.Verbose.Debug.WriteLine("\tchannel_name: {0}", Name);
90          }          }
91      }      }
92    

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

  ViewVC Help
Powered by ViewVC 1.1.22