共用方式為


HttpContentCodingWithQualityHeaderValue 類別

定義

表示接受 HTTP 要求上 Accept-Encoding HTTP 標頭中使用的編碼資訊。

public ref class HttpContentCodingWithQualityHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpContentCodingWithQualityHeaderValueFactory, 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 HttpContentCodingWithQualityHeaderValue 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.IHttpContentCodingWithQualityHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpContentCodingWithQualityHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpContentCodingWithQualityHeaderValueFactory), 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 HttpContentCodingWithQualityHeaderValue : 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.IHttpContentCodingWithQualityHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpContentCodingWithQualityHeaderValue : IStringable
function HttpContentCodingWithQualityHeaderValue(contentCoding, quality)
Public NotInheritable Class HttpContentCodingWithQualityHeaderValue
Implements IStringable
繼承
Object Platform::Object IInspectable HttpContentCodingWithQualityHeaderValue
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

HttpContentCodingWithQualityHeaderValue 類別代表接受 HTTP 要求上 Accept-Encoding HTTP 標頭中使用的編碼資訊。

HttpRequestHeaderCollection上的AcceptEncoding屬性會傳回包含HttpContentCodingWithQualityHeaderValueCollection的 HttpContentCodingWithQualityHeaderValue 物件。

建構函式

HttpContentCodingWithQualityHeaderValue(String)

使用內容編碼資訊,初始化HttpContentCodingHeaderValue類別的新實例。

HttpContentCodingWithQualityHeaderValue(String, Double)

使用內容編碼資訊和 qvalue,初始化HttpContentCodingHeaderValue類別的新實例。

屬性

ContentCoding

取得Accept-Encoding HTTP 標頭中內容編碼特性的值。

Quality

取得Accept-Encoding HTTP 標頭中qvalue屬性的值。

方法

Parse(String)

將字串轉換為 HttpContentCodingWithQualityHeaderValue 實例。

ToString()

會傳回代表目前 HttpContentCodingHeaderValue 物件的字串。

TryParse(String, HttpContentCodingWithQualityHeaderValue)

判斷字串是否有效 HttpContentCodingWithQualityHeaderValue 資訊。

適用於

另請參閱