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)

建構具有 value 做為其唯一項目的單一 XmlQuerySequence<T>Constructs a singleton XmlQuerySequence<T> that has value as its only element.

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)

如果指定的值位於序列中,則傳回 trueReturns true if the specified value is in the sequence.

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. 如果 seq 參數為 null,則會建立新的 XmlQuerySequence<T>If the seq parameter is null, creates a new XmlQuerySequence<T>.

CreateOrReuse(XmlQuerySequence<T>, T)

如果有指定的 XmlQuerySequence<T> 可以使用,則清除並重複使用這個序列。Clears and reuses the specified XmlQuerySequence<T> it is available. 如果 seq 參數為 null,則會建立新的 XmlQuerySequence<T> 並且將 item 新增到集合。If the seq parameter is null, creates a new XmlQuerySequence<T> and adds item to the collection.

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()

取得目前執行個體的 TypeGets 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()

傳回代表目前物件的字串。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

傳回 falseReturns false. XmlQuerySequence<T> 並不具備執行緒安全。The XmlQuerySequence<T> is not thread-safe.

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> 是唯讀的,這個屬性會傳回 trueIf the XmlQuerySequence<T> is read-only, this property returns true.

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)

如果指定的值位於序列中,則傳回 trueReturns true if the specified value is in the sequence.

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

傳回 true 以指出項目無法新增、移除或修改。Returns true to indicate items cannot be added, removed, or modified.

IList.IsReadOnly

取得值,指出 XmlQuerySequence<T> 是否唯讀。Gets a value indicating whether the XmlQuerySequence<T> is read-only. 一定是 trueAlways true.

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>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 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)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 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)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 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.

適用於