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

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

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

revision 130 by william, Wed Mar 13 14:39:08 2013 UTC revision 131 by william, Wed Mar 13 15:16:59 2013 UTC
# Line 152  namespace libxmltv.Core Line 152  namespace libxmltv.Core
152              if (filter == null) { throw new InvalidCastException(string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, typeof(IDataSourceFilterable).Name)); }              if (filter == null) { throw new InvalidCastException(string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, typeof(IDataSourceFilterable).Name)); }
153              filter.Filter(ref source, args);                          filter.Filter(ref source, args);            
154          }          }
155          public static void CreateSorterFromDataSource(ref object source, params string[] args)          public static void CreateSorterFromDataSource(ref object source, bool descending, params string[] args)
156          {          {
157              if (source == null) { throw new ArgumentNullException("source", "cannot be null"); }              if (source == null) { throw new ArgumentNullException("source", "cannot be null"); }
158              object t = ConvertSourceType(source.GetType(), source);              object t = ConvertSourceType(source.GetType(), source);
# Line 161  namespace libxmltv.Core Line 161  namespace libxmltv.Core
161              source = t;              source = t;
162              IDataSourceSortable sorter = (source as IDataSourceSortable);              IDataSourceSortable sorter = (source as IDataSourceSortable);
163              if (sorter == null) { throw new InvalidCastException(string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, typeof(IDataSourceSortable).Name)); }              if (sorter == null) { throw new InvalidCastException(string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, typeof(IDataSourceSortable).Name)); }
164              sorter.Sort(ref source, args);                          sorter.Sort(ref source, descending, args);            
165          }          }
166          #endregion          #endregion
167          #endregion          #endregion

Legend:
Removed from v.130  
changed lines
  Added in v.131

  ViewVC Help
Powered by ViewVC 1.1.22