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

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

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

--- trunk/libxmltv/Core/XMLTVChannel.cs	2013/03/07 12:11:41	27
+++ trunk/libxmltv/Core/XMLTVChannel.cs	2013/03/07 12:51:53	28
@@ -35,7 +35,7 @@
             foreach (var c in doc.Descendants(XMLTV_CONSTANTS.CHANNEL_ELEMENT))
             {
                 Channel channel = new Channel(c);
-                entries.Add(channel.ChannelId, channel);
+                entries.Add(channel.Id, channel);
             }
         }
         public override string ToString()
@@ -49,27 +49,31 @@
     {
         public Channel()
         {
-            ChannelId = string.Empty;
-            ChannelNumber = 0;
-            ChannelCallSign = string.Empty;
-            ChannelName = string.Empty;
+            Id = string.Empty;
+            Number = 0;
+            CallSign = string.Empty;
+            Name = string.Empty;
         }
         public Channel(XElement e)
             : this()
         {
             // get the channel id
-            ChannelId = e.Attribute(XMLTV_CONSTANTS.Channels.ChannelId).Value;
+            Id = e.Attribute(XMLTV_CONSTANTS.Channels.ChannelId).Value;
             var names = e.Descendants(XMLTV_CONSTANTS.Channels.ChannelDisplayName).ToList();
-            ChannelNumber = Convert.ToInt32(names[1].Value);
-            ChannelCallSign = names[2].Value;
-            ChannelName = names[3].Value;
+            Number = Convert.ToInt32(names[1].Value);
+            CallSign = names[2].Value;
+            Name = names[3].Value;
         }
         #region IXMLTVChannel members
-        public string ChannelId { get; private set; }
-        public int ChannelNumber { get; private set; }
-        public string ChannelCallSign { get; private set; }
-        public string ChannelName { get; private set; }
+        public string Id { get; private set; }
+        public int Number { get; private set; }
+        public string CallSign { get; private set; }
+        public string Name { get; private set; }
         #endregion
+        public override string ToString()
+        {
+            return string.Format("{0}: {1} {2} ({3})", Id,Number,Name, CallSign);
+        }
     }
 }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22