HttpNameValueHeaderValue 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示一些 HTTP 標頭中使用的名稱和值資訊。
public ref class HttpNameValueHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpNameValueHeaderValueFactory, 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 HttpNameValueHeaderValue 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.IHttpNameValueHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpNameValueHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpNameValueHeaderValueFactory), 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 HttpNameValueHeaderValue : 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.IHttpNameValueHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpNameValueHeaderValue : IStringable
function HttpNameValueHeaderValue(name, value)
Public NotInheritable Class HttpNameValueHeaderValue
Implements IStringable
- 繼承
- 屬性
- 實作
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
備註
HttpNameValueHeaderValue 類別支援各種標頭中使用的名稱/值組
建構函式
HttpNameValueHeaderValue(String) |
初始化 HttpNameValueHeaderValue 類別的新實例。 具有名稱。 |
HttpNameValueHeaderValue(String, String) |
初始化 HttpNameValueHeaderValue 類別的新實例。 具有名稱和值。 |
屬性
Name |
取得 HttpNameValueHeaderValue 物件中使用的名稱。 |
Value |
取得或設定與 HttpNameValueHeaderValue 物件中使用的名稱相關聯的值。 |
方法
Parse(String) |
將字串轉換為 HttpNameValueHeaderValue 實例。 |
ToString() |
會傳回表示目前 HttpNameValueHeaderValue 物件的字串。 |
TryParse(String, HttpNameValueHeaderValue) |
判斷字串是否為有效的 HttpNameValueHeaderValue 資訊。 |