9 [global::__DynamicallyInvokable]
41 [global::__DynamicallyInvokable]
48 [global::__DynamicallyInvokable]
57 [global::__DynamicallyInvokable]
60 [global::__DynamicallyInvokable]
73 [global::__DynamicallyInvokable]
76 [global::__DynamicallyInvokable]
85 [global::__DynamicallyInvokable]
88 [global::__DynamicallyInvokable]
97 [global::__DynamicallyInvokable]
100 this.enumerable = enumerable;
106 [global::__DynamicallyInvokable]
109 this.expression = expression;
115 [global::__DynamicallyInvokable]
118 if (expression ==
null)
120 throw Error.ArgumentNull(
"expression");
122 Type type = TypeHelper.FindGenericType(typeof(IQueryable<>), expression.Type);
125 throw Error.ArgumentNotValid(
"expression");
134 [global::__DynamicallyInvokable]
135 IQueryable<S> IQueryProvider.CreateQuery<
S>(
Expression expression)
137 if (expression ==
null)
139 throw Error.ArgumentNull(
"expression");
141 if (!typeof(IQueryable<S>).IsAssignableFrom(expression.Type))
143 throw Error.ArgumentNotValid(
"expression");
145 return new EnumerableQuery<S>(expression);
151 [global::__DynamicallyInvokable]
152 object IQueryProvider.Execute(
Expression expression)
154 if (expression ==
null)
156 throw Error.ArgumentNull(
"expression");
159 return EnumerableExecutor.Create(expression).ExecuteBoxed();
166 [global::__DynamicallyInvokable]
169 if (expression ==
null)
171 throw Error.ArgumentNull(
"expression");
173 if (!typeof(S).IsAssignableFrom(expression.Type))
175 throw Error.ArgumentNotValid(
"expression");
177 return new EnumerableExecutor<S>(expression).Execute();
182 [global::__DynamicallyInvokable]
185 return GetEnumerator();
190 [global::__DynamicallyInvokable]
193 return GetEnumerator();
198 if (enumerable ==
null)
200 EnumerableRewriter enumerableRewriter =
new EnumerableRewriter();
201 Expression body = enumerableRewriter.Visit(this.expression);
203 enumerable = expression.Compile()();
210 [global::__DynamicallyInvokable]
214 if (constantExpression !=
null && constantExpression.
Value ==
this)
216 if (enumerable !=
null)
218 return enumerable.ToString();
222 return expression.ToString();
Represents an expression that has a constant value.
EnumerableQuery(IEnumerable< T > enumerable)
Initializes a new instance of the T:System.Linq.EnumerableQuery`1 class and associates it with an T:S...
Represents the result of a sorting operation.
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
object Value
Gets the value of the constant expression.
Represents an T:System.Collections.IEnumerable as an T:System.Linq.EnumerableQuery data source.
Contains methods to create types of objects locally or remotely, or obtain references to existing rem...
virtual Type [] GetGenericArguments()
Returns an array of T:System.Type objects that represent the type arguments of a closed generic type ...
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
Provides the base class from which the classes that represent expression tree nodes are derived....
override string ToString()
Returns a textual representation of the enumerable collection or, if it is null, of the expression tr...
Represents type declarations: class types, interface types, array types, value types,...
IQueryable CreateQuery(Expression expression)
Constructs an T:System.Linq.IQueryable object that can evaluate the query represented by a specified ...
Provides functionality to evaluate queries against a specific data source wherein the type of the dat...
virtual Type MakeGenericType(params Type[] typeArguments)
Substitutes the elements of an array of types for the type parameters of the current generic type def...
Provides a set of static (Shared in Visual Basic) methods for querying objects that implement T:Syste...
IEnumerator GetEnumerator()
Returns an enumerator that iterates through a collection.
EnumerableQuery(Expression expression)
Initializes a new instance of the T:System.Linq.EnumerableQuery`1 class and associates the instance w...
static object CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture)
Creates an instance of the specified type using the constructor that best matches the specified param...
Defines methods to create and execute queries that are described by an T:System.Linq....
Supports a simple iteration over a non-generic collection.
EnumerableQuery()
Initializes a new instance of the T:System.Linq.EnumerableQuery class.