/[xmltv_parser]/branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.cs
ViewVC logotype

Diff of /branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.cs

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

revision 118 by william, Sun Mar 10 17:41:52 2013 UTC revision 120 by william, Sun Mar 10 18:19:12 2013 UTC
# Line 56  namespace libxmltv.Core Line 56  namespace libxmltv.Core
56          #region Property Dictionary Support          #region Property Dictionary Support
57          private IPropertyDictionary _MetaData;          private IPropertyDictionary _MetaData;
58          public IPropertyDictionary MetaData { get { return _MetaData; } private set { _MetaData = value; } }          public IPropertyDictionary MetaData { get { return _MetaData; } private set { _MetaData = value; } }
59          public List<IExtraMetaData> GetExtraMetaData()          public ExtraList GetExtraMetaData()
60          {          {
61              return (List<IExtraMetaData>)this.MetaData[XMLTVConstants.Programs.ProgramExtraMetaData];              return (ExtraList)this.MetaData[XMLTVConstants.Programs.ProgramExtraMetaData];
62          }          }
63          #endregion          #endregion
64    
# Line 84  namespace libxmltv.Core Line 84  namespace libxmltv.Core
84              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);              var fields = instance_type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
85              foreach (var field in fields)              foreach (var field in fields)
86              {              {
87                  if (field.FieldType == typeof(List<IXMLTVProgram>))                  if (field.FieldType == typeof(ProgramList))
88                  {                  {
89                      found_field = true;                      found_field = true;
90                      try                      try
91                      {                      {
92                            
93                          var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());                          var list = (ProgramList)field.GetValue(this.GetInstance());
94                          MetaData["Id"] = list.Count + 1;                          MetaData["Id"] = list.Count + 1;
95                          list.Add(this);                          list.Add(this);
96                          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());

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

  ViewVC Help
Powered by ViewVC 1.1.22