EnumerableQuery<T> 类

定义

IEnumerable<T> 集合表示为 IQueryable<T> 数据源。Represents an IEnumerable<T> collection as an IQueryable<T> data source.

此 API 支持产品基础结构,不能在代码中直接使用。

generic <typename T>
public ref class EnumerableQuery : System::Linq::EnumerableQuery, System::Collections::Generic::IEnumerable<T>, System::Linq::IOrderedQueryable<T>, System::Linq::IQueryable<T>, System::Linq::IQueryProvider
public class EnumerableQuery<T> : System.Linq.EnumerableQuery, System.Collections.Generic.IEnumerable<T>, System.Linq.IOrderedQueryable<T>, System.Linq.IQueryable<T>, System.Linq.IQueryProvider
type EnumerableQuery<'T> = class
    inherit EnumerableQuery
    interface IOrderedQueryable<'T>
    interface IQueryable
    interface IQueryProvider
    interface seq<'T>
    interface IEnumerable
    interface IQueryable<'T>
    interface IOrderedQueryable
Public Class EnumerableQuery(Of T)
Inherits EnumerableQuery
Implements IEnumerable(Of T), IOrderedQueryable(Of T), IQueryable(Of T), IQueryProvider

类型参数

T

集合中数据的类型。The type of the data in the collection.

继承
EnumerableQuery<T>
实现

构造函数

EnumerableQuery<T>(Expression)

初始化 EnumerableQuery<T> 类的新实例,并将该实例与表达式目录树关联。Initializes a new instance of the EnumerableQuery<T> class and associates the instance with an expression tree.

EnumerableQuery<T>(IEnumerable<T>)

初始化 EnumerableQuery<T> 类的新实例,并将该实例与 IEnumerable<T> 集合关联。Initializes a new instance of the EnumerableQuery<T> class and associates it with an IEnumerable<T> collection.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回可枚举集合的文本表示形式;如果该集合为 null,则返回与此实例关联的表达式树的文本表示形式。Returns a textual representation of the enumerable collection or, if it is null, of the expression tree that is associated with this instance.

显式界面实现

IEnumerable.GetEnumerator()

返回一个枚举数,该枚举数可以循环访问关联的 IEnumerable<T> 集合,如果该集合为空,则循环访问通过将关联的表达式目录树重写为 IEnumerable<T> 数据源上的查询并执行该查询而得到的集合。Returns an enumerator that can iterate through the associated IEnumerable<T> collection, or, if it is null, through the collection that results from rewriting the associated expression tree as a query on an IEnumerable<T> data source and executing it.

IEnumerable<T>.GetEnumerator()

返回一个枚举数,该枚举数可以循环访问关联的 IEnumerable<T> 集合,如果该集合为空,则循环访问通过将关联的表达式目录树重写为 IEnumerable<T> 数据源上的查询并执行该查询而得到的集合。Returns an enumerator that can iterate through the associated IEnumerable<T> collection, or, if it is null, through the collection that results from rewriting the associated expression tree as a query on an IEnumerable<T> data source and executing it.

IQueryable.ElementType

获取该实例所表示的集合中的数据的类型。Gets the type of the data in the collection that this instance represents.

IQueryable.Expression

获取与该实例关联或者表示该实例的表达式目录树。Gets the expression tree that is associated with or that represents this instance.

IQueryable.Provider

获取与该实例关联的查询提供程序。Gets the query provider that is associated with this instance.

IQueryProvider.CreateQuery(Expression)

构造一个新的 EnumerableQuery<T> 对象,并将它与表示 IQueryable 数据集合的指定表达式目录树关联。Constructs a new EnumerableQuery<T> object and associates it with a specified expression tree that represents an IQueryable collection of data.

IQueryProvider.CreateQuery<S>(Expression)

构造一个新的 EnumerableQuery<T> 对象,并将它与表示 IQueryable<T> 数据集合的指定表达式目录树关联。Constructs a new EnumerableQuery<T> object and associates it with a specified expression tree that represents an IQueryable<T> collection of data.

IQueryProvider.Execute(Expression)

在重写表达式后执行表达式,重写的目的是对无法通过 Enumerable 方法查询的任何可枚举数据源调用 Queryable 方法,而不是调用 Queryable 方法。Executes an expression after rewriting it to call Enumerable methods instead of Queryable methods on any enumerable data sources that cannot be queried by Queryable methods.

IQueryProvider.Execute<S>(Expression)

在重写表达式后执行表达式,重写的目的是对无法通过 Enumerable 方法查询的任何可枚举数据源调用 Queryable 方法,而不是调用 Queryable 方法。Executes an expression after rewriting it to call Enumerable methods instead of Queryable methods on any enumerable data sources that cannot be queried by Queryable methods.

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Cast<TResult>(IQueryable)

IQueryable 的元素转换为指定的类型。Converts the elements of an IQueryable to the specified type.

OfType<TResult>(IQueryable)

根据指定类型筛选 IQueryable 的元素。Filters the elements of an IQueryable based on a specified type.

SortBy<T>(IQueryable<T>, String)

指定排序顺序。Specifies a sort order.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于