HttpCookiePairHeaderValue 类

定义

表示 HTTP 请求上的 Cookie HTTP 标头中使用的 Cookie 信息。

public ref class HttpCookiePairHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpCookiePairHeaderValueFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpCookiePairHeaderValue final : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpCookiePairHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpCookiePairHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpCookiePairHeaderValueFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpCookiePairHeaderValue : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpCookiePairHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpCookiePairHeaderValue : IStringable
function HttpCookiePairHeaderValue(name, value)
Public NotInheritable Class HttpCookiePairHeaderValue
Implements IStringable
继承
Object Platform::Object IInspectable HttpCookiePairHeaderValue
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

HttpCookiePairHeaderValue 类表示 HTTP 请求上的 Cookie HTTP 标头中使用的 Cookie 信息。

HttpRequestHeaderCollection 上的 Cookie 属性返回包含 HttpCookiePairHeaderValue 对象的 HttpCookiePairHeaderValueCollection。

构造函数

HttpCookiePairHeaderValue(String)

初始化 HttpCookiePairHeaderValue 类的新实例。 具有 Cookie 名称。

HttpCookiePairHeaderValue(String, String)

初始化 HttpCookiePairHeaderValue 类的新实例。 具有 Cookie 名称和 Cookie 的值。

属性

Name

获取表示 Cookie HTTP 标头中使用的 Cookie 名称的标记。

Value

获取或设置 Cookie HTTP 标头中使用的 Cookie 的值。

方法

Parse(String)

将字符串转换为 HttpCookiePairHeaderValue 实例。

ToString()

返回表示当前 HttpCookiePairHeaderValue 对象的字符串。

TryParse(String, HttpCookiePairHeaderValue)

确定字符串是否为有效的 HttpCookiePairHeaderValue 信息。

适用于

另请参阅