XmlQuerySequence<T> 类
定义
XML 值的序列,可动态扩展并允许随机访问项。A sequence of XML values that dynamically expands and allows random access to items.
此 API 支持产品基础结构,不能在代码中直接使用。
generic <typename T>
public ref class XmlQuerySequence : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList
public class XmlQuerySequence<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList
type XmlQuerySequence<'T> = class
interface IList<'T>
interface IList
interface ICollection<'T>
interface seq<'T>
interface IEnumerable
interface ICollection
Public Class XmlQuerySequence(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T)
类型参数
- T
此 XmlQuerySequence<T> 的类型。The type of this XmlQuerySequence<T>.
- 继承
-
XmlQuerySequence<T>
- 派生
- 实现
构造函数
XmlQuerySequence<T>() |
初始化 XmlQuerySequence<T> 类的新实例。Initializes a new instance of the XmlQuerySequence<T> class. |
XmlQuerySequence<T>(Int32) |
初始化 XmlQuerySequence<T> 类的新实例。Initializes a new instance of the XmlQuerySequence<T> class. |
XmlQuerySequence<T>(T) |
构造一个单一实例 XmlQuerySequence<T>,该实例只有一个元素 |
XmlQuerySequence<T>(T[], Int32) |
初始化 XmlQuerySequence<T> 类的新实例。Initializes a new instance of the XmlQuerySequence<T> class. |
字段
Empty |
创建 XmlQuerySequence<T> 的新实例。Creates a new instance of XmlQuerySequence<T>. |
属性
Count |
返回序列中的项数。Returns the number of items in the sequence. |
Item[Int32] |
返回位于指定索引处的项。Returns the item at the specified index. |
方法
Add(T) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
Clear() |
在所有情况下都会引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
Contains(T) |
如果指定的值在序列中,则返回 |
CopyTo(T[], Int32) |
将此序列的内容复制到指定数组中从指定索引处开始的位置。Copies the contents of this sequence to the specified array, starting at the specified index in the array. |
CreateOrReuse(XmlQuerySequence<T>) |
清除并重用指定的 XmlQuerySequence<T>(如果可用)。Clears and reuses the specified XmlQuerySequence<T> if it is available. 如果 |
CreateOrReuse(XmlQuerySequence<T>, T) |
清除并重用指定的 XmlQuerySequence<T>(如果可用)。Clears and reuses the specified XmlQuerySequence<T> it is available. 如果 |
Equals(Object) |
确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
GetEnumerator() |
返回 IEnumerator<T>。Returns IEnumerator<T>. |
GetHashCode() |
用作默认哈希函数。Serves as the default hash function. (继承自 Object) |
GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
IndexOf(T) |
返回序列中指定值的索引。Returns the index of the specified value in the sequence. |
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. |
SortByKeys(Array) |
使用指定数组中包含的键对缓存中的项进行排序。Sort the items in the cache using the keys contained in the specified array. |
ToString() |
返回一个表示当前对象的 string。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. |
ICollection.IsSynchronized |
返回 |
ICollection.SyncRoot |
返回 XmlQuerySequence<T> 类的此实例。Returns this instance of the XmlQuerySequence<T> class. 此实例可用于同步访问。This instance can be used to synchronize access. |
ICollection<T>.Add(T) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
ICollection<T>.Clear() |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
ICollection<T>.IsReadOnly |
如果 XmlQuerySequence<T> 为只读,则此属性返回 |
ICollection<T>.Remove(T) |
从集合中移除指定的项。Removes the specified item from the collection. |
IEnumerable.GetEnumerator() |
返回一个可用于循环访问查询序列集合的枚举数。Returns an enumerator that can be used to iterate through the query sequence collection. |
IList.Add(Object) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
IList.Clear() |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
IList.Contains(Object) |
如果指定的值在序列中,则返回 |
IList.IndexOf(Object) |
返回序列中指定值的索引。Returns the index of the specified value in the sequence. |
IList.Insert(Int32, Object) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
IList.IsFixedSize |
返回 |
IList.IsReadOnly |
获取一个值,该值指示 XmlQuerySequence<T> 是否为只读。Gets a value indicating whether the XmlQuerySequence<T> is read-only. 总是为 |
IList.Item[Int32] |
返回位于指定索引处的项。Returns the item at the specified index. |
IList.Remove(Object) |
未实现。Not implemented. 引发 NotSupportedException 异常。Throws the NotSupportedException exception. |
IList.RemoveAt(Int32) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
IList<T>.Insert(Int32, T) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
IList<T>.RemoveAt(Int32) |
任何情况下均引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases. |
扩展方法
CopyToDataTable<T>(IEnumerable<T>) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
在给定其泛型参数 |
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 转换为 IQueryable。Converts 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. |