/[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 118 by william, Sun Mar 10 17:41:52 2013 UTC revision 120 by william, Sun Mar 10 18:19:12 2013 UTC
# Line 95  namespace libxmltv.Core Line 95  namespace libxmltv.Core
95              var list = gInstance.Programs;              var list = gInstance.Programs;
96              return list;              return list;
97          }          }
98    
99            public static BindingSource CreateBindingSourceForData(object data)
100            {
101                if (data == null) { throw new ArgumentNullException("data", "cannot be null"); }
102                BindingSource source = new BindingSource();
103    
104                IDataSourceBindable binder = (data as IDataSourceBindable);
105                if (binder == null)
106                {
107                    throw new InvalidCastException(string.Format("Cannot cast: '{0}' to '{1}'", data.GetType().Name, typeof(IDataSourceBindable).Name));
108                }
109    
110                object bindable = binder.CreateBindableDataSource();
111                source.DataSource = bindable;
112                return source;
113            }
114    
115          #endregion          #endregion
116          #endregion          #endregion
117    

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

  ViewVC Help
Powered by ViewVC 1.1.22