/[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 99 by william, Sun Mar 10 10:18:06 2013 UTC revision 120 by william, Sun Mar 10 18:19:12 2013 UTC
# Line 38  namespace libxmltv.Core Line 38  namespace libxmltv.Core
38          private void InternalDictionaryAddKnownProperties()          private void InternalDictionaryAddKnownProperties()
39          {          {
40              MetaData = new PropertyList();              MetaData = new PropertyList();
             //MetaData.AddProperty("Id", string.Empty);  
41          }          }
42          #region IXMLTVChannel members          #region IXMLTVChannel members
43          public string Id { get; private set; }          public string Id { get; private set; }
44          //public int Number { get; private set; }          //public int Number { get; private set; }
45          //public string CallSign { get; private set; }          //public string CallSign { get; private set; }
46          //public string Name { get; private set; }          //public string Name { get; private set; }
47          private PropertyList _MetaData;          private IPropertyList _MetaData;
48          public PropertyList MetaData { get { return _MetaData; } private set { _MetaData = value; } }          public IPropertyList MetaData { get { return _MetaData; } private set { _MetaData = value; } }
49          #endregion          #endregion
50          public override string ToString()          public override string ToString()
51          {          {
# Line 60  namespace libxmltv.Core Line 59  namespace libxmltv.Core
59              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
60              foreach (var field in fields)              foreach (var field in fields)
61              {              {
62                  if (field.FieldType == typeof(List<IXMLTVChannel>))                  if (field.FieldType == typeof(ChannelList))
63                  {                  {
64                      found_field = true;                      found_field = true;
65                      try                      try
66                      {                      {
67                          var list = (List<IXMLTVChannel>)field.GetValue(this.GetInstance());                          var list = (ChannelList)field.GetValue(this.GetInstance());
68                          list.Add(this);                          list.Add(this);
69                          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());
70                          field.SetValue(this.GetInstance(), list);                          field.SetValue(this.GetInstance(), list);

Legend:
Removed from v.99  
changed lines
  Added in v.120

  ViewVC Help
Powered by ViewVC 1.1.22