共用方式為


HttpContentRangeHeaderValue 類別

定義

表示要求或回應中 HTTP 內容上 Content-Range HTTP 標頭的值。

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

Windows 需求

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

備註

HttpContentRangeHeaderValue 類別代表 HTTP 要求或回應中所接收之 HTTP 內容上 Content-Range HTTP 標頭的值。

HttpContentHeaderCollection上的ContentRange屬性會傳回 HttpContentRangeHeaderValue 物件。

建構函式

HttpContentRangeHeaderValue(UInt64)

使用內容長度,初始化 HttpContentRangeHeaderValue 類別的新實例。

HttpContentRangeHeaderValue(UInt64, UInt64)

使用開始和停止位置,初始化 HttpContentRangeHeaderValue 類別的新實例。

HttpContentRangeHeaderValue(UInt64, UInt64, UInt64)

使用開始和停止位置和內容長度,初始化 HttpContentRangeHeaderValue 類別的新實例。

屬性

FirstBytePosition

取得開始在 Content-Range HTTP 標頭中傳送資料的位置。

LastBytePosition

取得停止在 Content-Range HTTP 標頭中傳送資料的位置。

Length

取得 Content-Range HTTP 標頭中完整內容實體主體的長度。

Unit

取得或設定 Content-Range HTTP 標頭中使用的範圍單位值。

方法

Parse(String)

將字串轉換為 HttpContentRangeHeaderValue 實例。

ToString()

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

TryParse(String, HttpContentRangeHeaderValue)

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

適用於

另請參閱