AddressHeaderCollection AddressHeaderCollection AddressHeaderCollection AddressHeaderCollection Class

定義

表示位址標頭的安全執行緒 (Thread-Safe)、唯讀集合。Represents a thread-safe, read-only collection of address headers.

public ref class AddressHeaderCollection sealed : System::Collections::ObjectModel::ReadOnlyCollection<System::ServiceModel::Channels::AddressHeader ^>
public sealed class AddressHeaderCollection : System.Collections.ObjectModel.ReadOnlyCollection<System.ServiceModel.Channels.AddressHeader>
type AddressHeaderCollection = class
    inherit ReadOnlyCollection<AddressHeader>
Public NotInheritable Class AddressHeaderCollection
Inherits ReadOnlyCollection(Of AddressHeader)
繼承
AddressHeaderCollectionAddressHeaderCollectionAddressHeaderCollectionAddressHeaderCollection

備註

AddressHeaderCollection 可以使用 IEnumerable<T> 物件的 AddressHeader 集合來加以初始化,然後使用 FindHeader(String, String) 方法來加以搜尋,以找出具有特定限定名稱的標頭。The AddressHeaderCollection can be initialized with an IEnumerable<T> set of AddressHeader objects and then searched for a header with a specific qualified name using the FindHeader(String, String) method. 若要尋找特定限定名稱的所有標頭,請使用 FindAll(String, String) 方法。To find all of the headers with a specific qualified name, use the FindAll(String, String) method. AddHeadersTo(Message) 方法是用來將標頭新增至指定之訊息的標頭中。The AddHeadersTo(Message) method is used to add headers to the headers of a specified message.

建構函式

AddressHeaderCollection() AddressHeaderCollection() AddressHeaderCollection() AddressHeaderCollection()

初始化 AddressHeaderCollection 類別的新執行個體。Initializes a new instance of the AddressHeaderCollection class.

AddressHeaderCollection(IEnumerable<AddressHeader>) AddressHeaderCollection(IEnumerable<AddressHeader>) AddressHeaderCollection(IEnumerable<AddressHeader>) AddressHeaderCollection(IEnumerable<AddressHeader>)

從位址標頭的可列舉集合初始化 AddressHeaderCollection 類別的新執行個體。Initializes a new instance of the AddressHeaderCollection class from an enumerable set of address headers.

方法

AddHeadersTo(Message) AddHeadersTo(Message) AddHeadersTo(Message) AddHeadersTo(Message)

將集合中的標頭新增至指定之訊息的標頭。Adds the headers in the collection to the headers of a specified message.

Contains(T) Contains(T) Contains(T) Contains(T)

判斷某項目是否在 ReadOnlyCollection<T> 中。Determines whether an element is in the ReadOnlyCollection<T>.

(Inherited from ReadOnlyCollection<T>)
CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

從目標陣列的指定索引開始,將整個 ReadOnlyCollection<T> 複製到相容的一維 ArrayCopies the entire ReadOnlyCollection<T> to a compatible one-dimensional Array, starting at the specified index of the target array.

(Inherited from ReadOnlyCollection<T>)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
FindAll(String, String) FindAll(String, String) FindAll(String, String) FindAll(String, String)

在集合中尋找具有指定之名稱和命名空間的所有位址標頭。Finds all the address headers in the collection with the specified name and namespace.

FindHeader(String, String) FindHeader(String, String) FindHeader(String, String) FindHeader(String, String)

在集合中尋找具有指定之名稱和命名空間的第一個位址標頭。Finds the first address header in the collection with a specified name and namespace.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回在 ReadOnlyCollection<T> 中逐一查看的列舉值。Returns an enumerator that iterates through the ReadOnlyCollection<T>.

(Inherited from ReadOnlyCollection<T>)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)

搜尋指定的物件,並傳回整個 ReadOnlyCollection<T> 中第一個相符項目之以零起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the entire ReadOnlyCollection<T>.

(Inherited from ReadOnlyCollection<T>)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

屬性

Count Count Count Count

取得包含在 ReadOnlyCollection<T> 執行個體中的項目數目。Gets the number of elements contained in the ReadOnlyCollection<T> instance.

(Inherited from ReadOnlyCollection<T>)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

取得值,這個值表示對 ICollection 的存取是否同步 (安全執行緒)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Inherited from ReadOnlyCollection<T>)
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

取得可用以同步存取 ICollection 的物件。Gets an object that can be used to synchronize access to the ICollection.

(Inherited from ReadOnlyCollection<T>)
ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly

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

(Inherited from ReadOnlyCollection<T>)
IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

取得值,指出 IList 是否有固定的大小。Gets a value indicating whether the IList has a fixed size.

(Inherited from ReadOnlyCollection<T>)
IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

取得值,指出 IList 是否唯讀。Gets a value indicating whether the IList is read-only.

(Inherited from ReadOnlyCollection<T>)
IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

取得位在指定索引處的元素。Gets the element at the specified index. 如果您嘗試在指定索引處設定項目,就會發生 NotSupportedExceptionA NotSupportedException occurs if you try to set the item at the specified index.

(Inherited from ReadOnlyCollection<T>)
IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32] IList<T>.Item[Int32]

取得位在指定索引處的元素。Gets the element at the specified index. 如果您嘗試在指定索引處設定項目,就會發生 NotSupportedExceptionAn NotSupportedException occurs if you try to set the item at the specified index.

(Inherited from ReadOnlyCollection<T>)
Items Items Items Items

傳回 IList<T> 所包裝的 ReadOnlyCollection<T>Returns the IList<T> that the ReadOnlyCollection<T> wraps.

(Inherited from ReadOnlyCollection<T>)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

取得位在指定索引處的元素。Gets the element at the specified index.

(Inherited from ReadOnlyCollection<T>)

明確介面實作

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製到 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index.

(Inherited from ReadOnlyCollection<T>)
ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T) ICollection<T>.Add(T)

將項目加入至 ICollection<T>Adds an item to the ICollection<T>. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear() ICollection<T>.Clear()

ICollection<T> 中移除所有項目。Removes all items from the ICollection<T>. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T) ICollection<T>.Remove(T)

ICollection<T> 移除特定物件之第一個符合的元素。Removes the first occurrence of a specific object from the ICollection<T>. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。Returns an enumerator that iterates through a collection.

(Inherited from ReadOnlyCollection<T>)
IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

將項目加入至 IListAdds an item to the IList. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList.Clear() IList.Clear() IList.Clear() IList.Clear()

IList 中移除所有項目。Removes all items from the IList. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

判斷 IList 是否包含特定值。Determines whether the IList contains a specific value.

(Inherited from ReadOnlyCollection<T>)
IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

判斷 IList 中指定項目的索引。Determines the index of a specific item in the IList.

(Inherited from ReadOnlyCollection<T>)
IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

將項目插入位於指定索引的 IListInserts an item to the IList at the specified index. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

IList 移除特定物件之第一個符合的元素。Removes the first occurrence of a specific object from the IList. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

移除在指定索引處的 IList 項目。Removes the IList item at the specified index. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T) IList<T>.Insert(Int32, T)

將項目插入位於指定索引的 IList<T>Inserts an item to the IList<T> at the specified index. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)
IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32) IList<T>.RemoveAt(Int32)

移除在指定索引處的 IList<T> 項目。Removes the IList<T> item at the specified index. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

(Inherited from ReadOnlyCollection<T>)

擴充方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) 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) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於