/[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 128 by william, Wed Mar 13 13:45:05 2013 UTC revision 130 by william, Wed Mar 13 14:39:08 2013 UTC
# Line 144  namespace libxmltv.Core Line 144  namespace libxmltv.Core
144          public static void CreateFilterFromDataSource(ref object source, params string[] args)          public static void CreateFilterFromDataSource(ref object source, params string[] args)
145          {          {
146              if (source == null) { throw new ArgumentNullException("source", "cannot be null"); }              if (source == null) { throw new ArgumentNullException("source", "cannot be null"); }
147             object t = ConvertSourceType(source.GetType(), source);              object t = ConvertSourceType(source.GetType(), source);
148             if (t == null) { throw new ArgumentException("source_type", string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, source.GetType().Name)); }              if (t == null) { throw new ArgumentException("source_type", string.Format("Cannot cast: '{0}' to '{1}'", source.GetType().Name, source.GetType().Name)); }
149              if (args == null) { throw new ArgumentNullException("args", "cannot be null"); }              if (args == null) { throw new ArgumentNullException("args", "cannot be null"); }
150              source = t;              source = t;
151              IDataSourceFilterable filter = (source as IDataSourceFilterable);              IDataSourceFilterable filter = (source as IDataSourceFilterable);
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, params string[] args)
156          {          {

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

  ViewVC Help
Powered by ViewVC 1.1.22