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

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

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

revision 75 by william, Sat Mar 9 11:17:13 2013 UTC revision 76 by william, Sat Mar 9 11:23:09 2013 UTC
# Line 50  namespace libxmltv.Core Line 50  namespace libxmltv.Core
50              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
51              foreach (var field in fields)              foreach (var field in fields)
52              {              {
53                  if (field.FieldType == typeof(List<IXMLTVChannel>))                  if (field.FieldType == typeof(List<IXMLTVProgram>))
54                  {                  {
55                      found_field = true;                      found_field = true;
56                      try                      try
57                      {                      {
58                          xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());                          xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());
                         //field.SetValue(this.GetInstance(), new List<IXMLTVChannel>() { this });  
   
59                          var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());                          var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());
60                          this.Id = list.Count + 1;                          this.Id = list.Count + 1;
61                          list.Add(this);                          list.Add(this);

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

  ViewVC Help
Powered by ViewVC 1.1.22