HttpHeaders HttpHeaders HttpHeaders HttpHeaders Class

定義

標頭及其值的集合,如 RFC 2616 中所定義。A collection of headers and their values as defined in RFC 2616.

public ref class HttpHeaders abstract : System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Collections::Generic::IEnumerable<System::String ^> ^>>
public abstract class HttpHeaders : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Collections.Generic.IEnumerable<string>>>
type HttpHeaders = class
    interface seq<KeyValuePair<string, seq<string>>>
    interface IEnumerable
Public MustInherit Class HttpHeaders
Implements IEnumerable(Of KeyValuePair(Of String, IEnumerable(Of String)))
繼承
HttpHeadersHttpHeadersHttpHeadersHttpHeaders
衍生
實作

建構函式

HttpHeaders() HttpHeaders() HttpHeaders() HttpHeaders()

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

方法

Add(String, IEnumerable<String>) Add(String, IEnumerable<String>) Add(String, IEnumerable<String>) Add(String, IEnumerable<String>)

將指定的標頭及其值加入至 HttpHeaders 集合中。Adds the specified header and its values into the HttpHeaders collection.

Add(String, String) Add(String, String) Add(String, String) Add(String, String)

將指定的標頭及其值加入至 HttpHeaders 集合中。Adds the specified header and its value into the HttpHeaders collection.

Clear() Clear() Clear() Clear()

移除 HttpHeaders 集合中的所有標頭。Removes all headers from the HttpHeaders collection.

Contains(String) Contains(String) Contains(String) Contains(String)

傳回在 HttpHeaders 集合中是否有特定的標頭。Returns if a specific header exists in the HttpHeaders collection.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回可以逐一查看 HttpHeaders 執行個體的列舉值。Returns an enumerator that can iterate through the HttpHeaders instance.

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

傳回 HttpHeaders 集合中儲存之指定標頭的所有標頭值。Returns all header values for a specified header stored in the HttpHeaders collection.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Remove(String) Remove(String) Remove(String) Remove(String)

HttpHeaders 集合中移除指定的標頭。Removes the specified header from the HttpHeaders collection.

ToString() ToString() ToString() ToString()

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

TryAddWithoutValidation(String, IEnumerable<String>) TryAddWithoutValidation(String, IEnumerable<String>) TryAddWithoutValidation(String, IEnumerable<String>) TryAddWithoutValidation(String, IEnumerable<String>)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its values were added to the HttpHeaders collection without validating the provided information.

TryAddWithoutValidation(String, String) TryAddWithoutValidation(String, String) TryAddWithoutValidation(String, String) TryAddWithoutValidation(String, String)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its value were added to the HttpHeaders collection without validating the provided information.

TryGetValues(String, IEnumerable<String>) TryGetValues(String, IEnumerable<String>) TryGetValues(String, IEnumerable<String>) TryGetValues(String, IEnumerable<String>)

如果指定的標頭和指定值儲存於 HttpHeaders 集合中,則會傳回。Return if a specified header and specified values are stored in the HttpHeaders collection.

明確介面實作

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

取得可以逐一查看 HttpHeaders 的列舉程式。Gets an enumerator that can iterate through a HttpHeaders.

擴充方法

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.

適用於