共用方式為


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 資訊。

適用於

另請參閱