XmlQueryNodeSequence 类

定义

XML 节点的序列,可动态扩展并允许随机访问项。A sequence of XML nodes that dynamically expands and allows random access to items.

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

public ref class XmlQueryNodeSequence sealed : System::Xml::Xsl::Runtime::XmlQuerySequence<System::Xml::XPath::XPathNavigator ^>, System::Collections::Generic::ICollection<System::Xml::XPath::XPathItem ^>, System::Collections::Generic::IEnumerable<System::Xml::XPath::XPathItem ^>, System::Collections::Generic::IList<System::Xml::XPath::XPathItem ^>
public sealed class XmlQueryNodeSequence : System.Xml.Xsl.Runtime.XmlQuerySequence<System.Xml.XPath.XPathNavigator>, System.Collections.Generic.ICollection<System.Xml.XPath.XPathItem>, System.Collections.Generic.IEnumerable<System.Xml.XPath.XPathItem>, System.Collections.Generic.IList<System.Xml.XPath.XPathItem>
type XmlQueryNodeSequence = class
    inherit XmlQuerySequence<XPathNavigator>
    interface IList<XPathItem>
    interface ICollection<XPathItem>
    interface seq<XPathItem>
    interface IEnumerable
Public NotInheritable Class XmlQueryNodeSequence
Inherits XmlQuerySequence(Of XPathNavigator)
Implements ICollection(Of XPathItem), IEnumerable(Of XPathItem), IList(Of XPathItem)
继承
XmlQueryNodeSequence
实现

构造函数

XmlQueryNodeSequence()

初始化 XmlQueryNodeSequence 类的新实例。Initializes a new instance of the XmlQueryNodeSequence class.

XmlQueryNodeSequence(IList<XPathNavigator>)

初始化 XmlQueryNodeSequence 类的新实例。Initializes a new instance of the XmlQueryNodeSequence class.

XmlQueryNodeSequence(Int32)

初始化 XmlQueryNodeSequence 类的新实例。Initializes a new instance of the XmlQueryNodeSequence class.

XmlQueryNodeSequence(XPathNavigator)

初始化 XmlQueryNodeSequence 类的新实例。Initializes a new instance of the XmlQueryNodeSequence class.

XmlQueryNodeSequence(XPathNavigator[], Int32)

初始化 XmlQueryNodeSequence 类的新实例。Initializes a new instance of the XmlQueryNodeSequence class.

字段

Empty

获取一个正确初始化的空 XmlQueryNodeSequenceGets an empty XmlQueryNodeSequence that is properly initialized.

属性

Count

返回序列中的项数。Returns the number of items in the sequence.

(继承自 XmlQuerySequence<T>)
IsDocOrderDistinct

如果此属性为 true,则此缓存中的节点将按文档顺序排列并且不含重复项。If this property is true, the nodes in this cache are in document order with no duplicates.

Item[Int32]

返回位于指定索引处的项。Returns the item at the specified index.

(继承自 XmlQuerySequence<T>)

方法

Add(T)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
AddClone(XPathNavigator)

克隆导航器然后向序列添加节点。Clone the navigator and then adds a node to the sequence.

Clear()

在所有情况下都会引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
Contains(T)

如果指定的值在序列中,则返回 trueReturns true if the specified value is in the sequence.

(继承自 XmlQuerySequence<T>)
CopyTo(T[], Int32)

将此序列的内容复制到指定数组中从指定索引处开始的位置。Copies the contents of this sequence to the specified array, starting at the specified index in the array.

(继承自 XmlQuerySequence<T>)
CreateOrReuse(XmlQueryNodeSequence)

清除并重用指定的 XmlQueryNodeSequence(如果可用)。Clears and reuses the specified XmlQueryNodeSequence if it is available. 如果 seq 参数为 null,则创建一个新的 XmlQueryNodeSequenceIf the seq parameter is null, creates a new XmlQueryNodeSequence.

CreateOrReuse(XmlQueryNodeSequence, XPathNavigator)

清除并重用指定的 XmlQueryNodeSequence(如果可用)。Clears and reuses the specified XmlQueryNodeSequence if it is available. 如果 seq 参数为 null,则创建一个新的 XmlQueryNodeSequence 并将 navigator 添加到序列中。If the seq parameter is null, creates a new XmlQueryNodeSequence and adds navigator to the sequence.

DocOrderDistinct(IComparer<XPathNavigator>)

返回一个序列,该序列包含此缓存中的所有非重复节点(按文档顺序排序)。Returns a sequence that contains all the distinct nodes in this cache, sorted in document order.

Equals(Object)

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

(继承自 Object)
GetEnumerator()

返回 IEnumerator<T>Returns IEnumerator<T>.

(继承自 XmlQuerySequence<T>)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
IndexOf(T)

返回序列中指定值的索引。Returns the index of the specified value in the sequence.

(继承自 XmlQuerySequence<T>)
MemberwiseClone()

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

(继承自 Object)
OnItemsChanged()

当已添加或移除缓存中的一个或多个项时调用。Called when one or more items in the cache have been added or removed. 也可以从 SortByKeys(Array) 方法调用此方法。This method can also be called from the SortByKeys(Array) method.

(继承自 XmlQuerySequence<T>)
SortByKeys(Array)

使用指定数组中包含的键对缓存中的项进行排序。Sort the items in the cache using the keys contained in the specified array.

(继承自 XmlQuerySequence<T>)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

ICollection.CopyTo(Array, Int32)

将此序列的内容复制到指定目标数组中从指定索引处开始的位置。Copies the contents of this sequence to the specified array, starting at the specified index in the target array.

(继承自 XmlQuerySequence<T>)
ICollection.IsSynchronized

返回 falseReturns false. XmlQuerySequence<T> 不是线程安全的。The XmlQuerySequence<T> is not thread-safe.

(继承自 XmlQuerySequence<T>)
ICollection.SyncRoot

返回 XmlQuerySequence<T> 类的此实例。Returns this instance of the XmlQuerySequence<T> class. 此实例可用于同步访问。This instance can be used to synchronize access.

(继承自 XmlQuerySequence<T>)
ICollection<T>.Add(T)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
ICollection<T>.Clear()

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
ICollection<T>.IsReadOnly

如果 XmlQuerySequence<T> 为只读,则此属性返回 trueIf the XmlQuerySequence<T> is read-only, this property returns true.

(继承自 XmlQuerySequence<T>)
ICollection<T>.Remove(T)

从集合中移除指定的项。Removes the specified item from the collection.

(继承自 XmlQuerySequence<T>)
ICollection<XPathItem>.Add(XPathItem)

引发 NotSupportedException 异常。Throws the NotSupportedException exception.

ICollection<XPathItem>.Clear()

引发 NotSupportedException 异常。Throws the NotSupportedException exception.

ICollection<XPathItem>.Contains(XPathItem)

如果指定的值在序列中,则返回 true。Returns true if the specified value is in the sequence.

ICollection<XPathItem>.CopyTo(XPathItem[], Int32)

将此序列的内容复制到指定目标数组中从指定索引处开始的位置。Copies the contents of this sequence to the specified array, starting at the specified index in the target array.

ICollection<XPathItem>.get_Count()
ICollection<XPathItem>.IsReadOnly

指定无法通过 ICollection<T> 接口添加、移除或修改项。Specifies that items cannot be added, removed, or modified through the ICollection<T> interface.

ICollection<XPathItem>.Remove(XPathItem)

引发 NotSupportedException 异常。Throws the NotSupportedException exception.

IEnumerable.GetEnumerator()

返回一个可用于循环访问查询序列集合的枚举数。Returns an enumerator that can be used to iterate through the query sequence collection.

(继承自 XmlQuerySequence<T>)
IEnumerable<XPathItem>.GetEnumerator()

返回 XPathItem 实现的 IEnumerator<T>Returns the IEnumerator<T> of XPathItem implementation.

IList.Add(Object)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList.Clear()

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList.Contains(Object)

如果指定的值在序列中,则返回 trueReturns true if the specified value is in the sequence.

(继承自 XmlQuerySequence<T>)
IList.IndexOf(Object)

返回序列中指定值的索引。Returns the index of the specified value in the sequence.

(继承自 XmlQuerySequence<T>)
IList.Insert(Int32, Object)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList.IsFixedSize

返回 true 以指示不能添加、移除或修改项。Returns true to indicate items cannot be added, removed, or modified.

(继承自 XmlQuerySequence<T>)
IList.IsReadOnly

获取一个值,该值指示 XmlQuerySequence<T> 是否为只读。Gets a value indicating whether the XmlQuerySequence<T> is read-only. 总是为 trueAlways true.

(继承自 XmlQuerySequence<T>)
IList.Item[Int32]

返回位于指定索引处的项。Returns the item at the specified index.

(继承自 XmlQuerySequence<T>)
IList.Remove(Object)

未实现。Not implemented. 引发 NotSupportedException 异常。Throws the NotSupportedException exception.

(继承自 XmlQuerySequence<T>)
IList.RemoveAt(Int32)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList<T>.Insert(Int32, T)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList<T>.RemoveAt(Int32)

任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

(继承自 XmlQuerySequence<T>)
IList<XPathItem>.IndexOf(XPathItem)

返回序列中指定值的索引。Returns the index of the specified value in the sequence.

IList<XPathItem>.Insert(Int32, XPathItem)

引发 NotSupportedException 异常。Throws the NotSupportedException exception.

IList<XPathItem>.Item[Int32]

返回位于指定索引处的项。Returns the item at the specified index.

IList<XPathItem>.RemoveAt(Int32)

引发 NotSupportedException 异常。Throws the NotSupportedException exception.

扩展方法

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.

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.

适用于