HttpHeaders 类
定义
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)))
- 继承
-
HttpHeaders
- 派生
- 实现
构造函数
HttpHeaders() |
初始化 HttpHeaders 类的新实例。Initializes a new instance of the HttpHeaders class. |
方法
Add(String, IEnumerable<String>) |
添加指定的标头及其值到 HttpHeaders 集合中。Adds the specified header and its values into the HttpHeaders collection. |
Add(String, String) |
添加指定的标头及其值到 HttpHeaders 集合中。Adds the specified header and its value into the HttpHeaders collection. |
Clear() |
从 HttpHeaders 集合中移除所有标头。Removes all headers from the HttpHeaders collection. |
Contains(String) |
在 HttpHeaders 集合中存在特定标头时返回。Returns if a specific header exists in the HttpHeaders collection. |
Equals(Object) |
确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
GetEnumerator() |
返回可循环访问 HttpHeaders 实例的枚举器。Returns an enumerator that can iterate through the HttpHeaders instance. |
GetHashCode() |
用作默认哈希函数。Serves as the default hash function. (继承自 Object) |
GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
GetValues(String) |
返回存储于 HttpHeaders 集合中的指定标头的所有标头值。Returns all header values for a specified header stored in the HttpHeaders collection. |
MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
Remove(String) |
从 HttpHeaders 集合中移除指定的标头。Removes the specified header from the HttpHeaders collection. |
ToString() |
返回表示当前 HttpHeaders 对象的字符串。Returns a string that represents the current HttpHeaders object. |
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) |
返回一个值,该值指示指定的标头及其值是否添加到了 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>) |
如果指定的标头和指定的值存储在 HttpHeaders 集合中,则返回。Return if a specified header and specified values are stored in the HttpHeaders collection. |
显式界面实现
IEnumerable.GetEnumerator() |
获取可循环访问 HttpHeaders 的枚举器。Gets an enumerator that can iterate through a HttpHeaders. |
扩展方法
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. |