fix AsQueryable signature
authorJb Evain <jbevain@gmail.com>
Fri, 9 May 2008 13:28:39 +0000 (13:28 -0000)
committerJb Evain <jbevain@gmail.com>
Fri, 9 May 2008 13:28:39 +0000 (13:28 -0000)
svn path=/trunk/mcs/; revision=102866

mcs/class/System.Core/System.Linq/Queryable.cs

index 58ec17b470cb3d60654b9609d3c6374b803b6d7b..b7db861f8d807bb3efd17af4e77952b3f1d82601 100644 (file)
@@ -30,6 +30,7 @@
 //
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq.Expressions;
 using System.Reflection;
@@ -136,15 +137,23 @@ namespace System.Linq {
 
                #region AsQueryable
 
+               [MonoTODO]
                public static IQueryable<TElement> AsQueryable<TElement> (this IEnumerable<TElement> source)
                {
-                       if (source is IQueryable<TElement>)
-                               return (IQueryable<TElement>) source;
+                       var queryable = source as IQueryable<TElement>;
+                       if (queryable != null)
+                               return queryable;
+
                        throw new NotImplementedException ();
                }
 
-               public static IQueryable AsQueryable (this IQueryable source)
+               [MonoTODO]
+               public static IQueryable AsQueryable (this IEnumerable source)
                {
+                       var queryable = source as IQueryable;
+                       if (queryable != null)
+                               return queryable;
+
                        throw new NotImplementedException ();
                }