/[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 74 by william, Sat Mar 9 11:06:39 2013 UTC revision 75 by william, Sat Mar 9 11:17:13 2013 UTC
# Line 22  namespace libxmltv.Core Line 22  namespace libxmltv.Core
22              : base(instance, XMLTVConstants.CHANNEL_ELEMENT)              : base(instance, XMLTVConstants.CHANNEL_ELEMENT)
23          {          {
24              xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVChannel");              xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVChannel");
25              // get the channel id              Create(node);
             Id = node.Attribute(XMLTVConstants.Channels.ChannelId).Value;  
             xmltv_logger.Verbose.Debug.WriteLine("\tchannel_id: {0}", Id);  
             var names = node.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();  
             Number = Convert.ToInt32(names[1].Value);  
             xmltv_logger.Verbose.Debug.WriteLine("\tchannel_number: {0}", Number);  
             CallSign = names[2].Value;  
             xmltv_logger.Verbose.Debug.WriteLine("\tchannel_callsign: {0}", CallSign);  
             Name = names[3].Value;  
             xmltv_logger.Verbose.Debug.WriteLine("\tchannel_name: {0}", Name);  
26              xmltv_logger.Verbose.Debug.WriteLine("Created Instance of XMLTVChannel");              xmltv_logger.Verbose.Debug.WriteLine("Created Instance of XMLTVChannel");
27              UpdateInstance();                          UpdateInstance();            
28          }          }
# Line 78  namespace libxmltv.Core Line 69  namespace libxmltv.Core
69                  xmltv_logger.Verbose.Error.WriteLine("Unable to update instance with channel information.");                  xmltv_logger.Verbose.Error.WriteLine("Unable to update instance with channel information.");
70              }              }
71          }          }
72    
73            private void Create(XElement node)
74            {
75                // get the channel id
76                Id = node.Attribute(XMLTVConstants.Channels.ChannelId).Value;
77                xmltv_logger.Verbose.Debug.WriteLine("\tchannel_id: {0}", Id);
78                var names = node.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();
79                Number = Convert.ToInt32(names[1].Value);
80                xmltv_logger.Verbose.Debug.WriteLine("\tchannel_number: {0}", Number);
81                CallSign = names[2].Value;
82                xmltv_logger.Verbose.Debug.WriteLine("\tchannel_callsign: {0}", CallSign);
83                Name = names[3].Value;
84                xmltv_logger.Verbose.Debug.WriteLine("\tchannel_name: {0}", Name);
85            }
86      }      }
87    
88  }  }

Legend:
Removed from v.74  
changed lines
  Added in v.75

  ViewVC Help
Powered by ViewVC 1.1.22